PvZH Modding Wiki
pvzhmodwiki
https://pvzhmod.miraheze.org/wiki/Main_Page
MediaWiki 1.40.2
first-letter
Media
Special
Talk
User
User talk
PvZH Modding Wiki
PvZH Modding Wiki talk
File
File talk
MediaWiki
MediaWiki talk
Template
Template talk
Help
Help talk
Category
Category talk
Module
Module talk
Translations
Translations talk
Gadget
Gadget talk
Gadget definition
Gadget definition talk
Template:-
10
37
71
2016-11-10T02:15:30Z
mediawikiwiki>Ciencia Al Poder
0
Protected "[[Template:-]]": Highly visible template ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))
wikitext
text/x-wiki
#REDIRECT [[Template:Clear]]
1a2aa4a9ba7478e54a2b21cbce68887ea297ea86
Template:Clear
10
39
75
2019-07-12T22:36:32Z
mediawikiwiki>Jdforrester (WMF)
0
1 revision imported from [[:w:en:Template:Clear]]: Page about technical change that was posted to a local wiki
wikitext
text/x-wiki
<div style="clear: {{{1|both}}};"></div><noinclude>
{{Documentation}}</noinclude>
529df0ba87c6f5d2ef3cdc233a2f08f7a6242ec7
Template:Yesno
10
50
97
2019-08-30T05:49:31Z
mediawikiwiki>DannyS712
0
Protected "[[Template:Yesno]]": Highly visible template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only administrators] (indefinite))
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }}
|no
|n
|false
|0 = {{{no|<!-- null -->}}}
| = {{{blank|{{{no|<!-- null -->}}}}}}
|¬ = {{{¬|}}}
|yes
|y
|true
|1 = {{{yes|yes}}}
|#default = {{{def|{{{yes|yes}}}}}}
}}<noinclude>
{{Documentation}}
</noinclude>
166fab9e5411aacd02ca4c9e93fbc7bf6bcf26ac
Module:Arguments
828
10
19
2019-09-02T12:39:11Z
mediawikiwiki>AKlapper (WMF)
0
4 revisions imported from [[:meta:Module:Arguments]]: See [[phab:T231001]]
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
3134ecce8429b810d445e29eae115e2ae4c36c53
Template:Pagelang
10
46
89
2019-11-10T01:45:55Z
mediawikiwiki>Shirayuki
0
This template should return empty string if the pagename does not end with "/en" for consistency
wikitext
text/x-wiki
{{#ifeq:{{#invoke:Template translation|getLanguageSubpage|{{{1|}}}}}|en
|{{#ifeq:{{#titleparts:{{{1|{{PAGENAME}}}}}||-1}}|en
|{{#invoke:Template translation|getLanguageSubpage|{{{1|}}}}}
}}
|{{#invoke:Template translation|getLanguageSubpage|{{{1|}}}}}
}}<noinclude>
{{Documentation}}
</noinclude>
c4102d40356283246cbc855bef4754c0a15b4bea
Template:·
10
51
99
2019-12-23T07:22:16Z
mediawikiwiki>Ainz Ooal Gown
0
42 revisions imported from [[:w:en:Template:·]]: Documentation for Template:Tag_description
wikitext
text/x-wiki
<b>·</b> <noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
bddcd60a7b03421d93c14219c3518e748538fd4e
Module:Documentation/i18n
828
14
25
2019-12-28T03:33:21Z
94rain
8
Protected "[[Module:Documentation/i18n]]": Highly visible page or template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only administrators] (indefinite))
Scribunto
text/plain
local format = require('Module:TNT').format
local i18n = {}
i18n['cfg-error-msg-type'] = format('I18n/Documentation', 'cfg-error-msg-type')
i18n['cfg-error-msg-empty'] = format('I18n/Documentation', 'cfg-error-msg-empty')
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
i18n['template-namespace-heading'] = format('I18n/Documentation', 'template-namespace-heading')
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
i18n['module-namespace-heading'] = format('I18n/Documentation', 'module-namespace-heading')
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
i18n['file-namespace-heading'] = format('I18n/Documentation', 'file-namespace-heading')
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
i18n['other-namespaces-heading'] = format('I18n/Documentation', 'other-namespaces-heading')
-- cfg['view-link-display']
-- The text to display for "view" links.
i18n['view-link-display'] = format('I18n/Documentation', 'view-link-display')
-- cfg['edit-link-display']
-- The text to display for "edit" links.
i18n['edit-link-display'] = format('I18n/Documentation', 'edit-link-display')
-- cfg['history-link-display']
-- The text to display for "history" links.
i18n['history-link-display'] = format('I18n/Documentation', 'history-link-display')
-- cfg['purge-link-display']
-- The text to display for "purge" links.
i18n['purge-link-display'] = format('I18n/Documentation', 'purge-link-display')
-- cfg['create-link-display']
-- The text to display for "create" links.
i18n['create-link-display'] = format('I18n/Documentation', 'create-link-display')
return i18n
9a9f234b177a424f1fc465eb25c484eff54905c0
Module:TableTools
828
27
51
2020-03-01T02:09:18Z
Minorax
10
4 revisions imported from [[:meta:Module:TableTools]]
Scribunto
text/plain
--[[
------------------------------------------------------------------------------------
-- TableTools --
-- --
-- This module includes a number of functions for dealing with Lua tables. --
-- It is a meta-module, meant to be called from other Lua modules, and should --
-- not be called directly from #invoke. --
------------------------------------------------------------------------------------
--]]
local libraryUtil = require('libraryUtil')
local p = {}
-- Define often-used variables and functions.
local floor = math.floor
local infinity = math.huge
local checkType = libraryUtil.checkType
local checkTypeMulti = libraryUtil.checkTypeMulti
--[[
------------------------------------------------------------------------------------
-- isPositiveInteger
--
-- This function returns true if the given value is a positive integer, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a given table key is in the array part or the
-- hash part of a table.
------------------------------------------------------------------------------------
--]]
function p.isPositiveInteger(v)
if type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- isNan
--
-- This function returns true if the given number is a NaN value, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a value can be a valid table key. Lua will
-- generate an error if a NaN is used as a table key.
------------------------------------------------------------------------------------
--]]
function p.isNan(v)
if type(v) == 'number' and tostring(v) == '-nan' then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- shallowClone
--
-- This returns a clone of a table. The value returned is a new table, but all
-- subtables and functions are shared. Metamethods are respected, but the returned
-- table will have no metatable of its own.
------------------------------------------------------------------------------------
--]]
function p.shallowClone(t)
local ret = {}
for k, v in pairs(t) do
ret[k] = v
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- removeDuplicates
--
-- This removes duplicate values from an array. Non-positive-integer keys are
-- ignored. The earliest value is kept, and all subsequent duplicate values are
-- removed, but otherwise the array order is unchanged.
------------------------------------------------------------------------------------
--]]
function p.removeDuplicates(t)
checkType('removeDuplicates', 1, t, 'table')
local isNan = p.isNan
local ret, exists = {}, {}
for i, v in ipairs(t) do
if isNan(v) then
-- NaNs can't be table keys, and they are also unique, so we don't need to check existence.
ret[#ret + 1] = v
else
if not exists[v] then
ret[#ret + 1] = v
exists[v] = true
end
end
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- numKeys
--
-- This takes a table and returns an array containing the numbers of any numerical
-- keys that have non-nil values, sorted in numerical order.
------------------------------------------------------------------------------------
--]]
function p.numKeys(t)
checkType('numKeys', 1, t, 'table')
local isPositiveInteger = p.isPositiveInteger
local nums = {}
for k, v in pairs(t) do
if isPositiveInteger(k) then
nums[#nums + 1] = k
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- affixNums
--
-- This takes a table and returns an array containing the numbers of keys with the
-- specified prefix and suffix. For example, for the table
-- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will
-- return {1, 3, 6}.
------------------------------------------------------------------------------------
--]]
function p.affixNums(t, prefix, suffix)
checkType('affixNums', 1, t, 'table')
checkType('affixNums', 2, prefix, 'string', true)
checkType('affixNums', 3, suffix, 'string', true)
local function cleanPattern(s)
-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.
s = s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
return s
end
prefix = prefix or ''
suffix = suffix or ''
prefix = cleanPattern(prefix)
suffix = cleanPattern(suffix)
local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'
local nums = {}
for k, v in pairs(t) do
if type(k) == 'string' then
local num = mw.ustring.match(k, pattern)
if num then
nums[#nums + 1] = tonumber(num)
end
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- numData
--
-- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table
-- of subtables in the format
-- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} }
-- Keys that don't end with an integer are stored in a subtable named "other".
-- The compress option compresses the table so that it can be iterated over with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.numData(t, compress)
checkType('numData', 1, t, 'table')
checkType('numData', 2, compress, 'boolean', true)
local ret = {}
for k, v in pairs(t) do
local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$')
if num then
num = tonumber(num)
local subtable = ret[num] or {}
if prefix == '' then
-- Positional parameters match the blank string; put them at the start of the subtable instead.
prefix = 1
end
subtable[prefix] = v
ret[num] = subtable
else
local subtable = ret.other or {}
subtable[k] = v
ret.other = subtable
end
end
if compress then
local other = ret.other
ret = p.compressSparseArray(ret)
ret.other = other
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- compressSparseArray
--
-- This takes an array with one or more nil values, and removes the nil values
-- while preserving the order, so that the array can be safely traversed with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.compressSparseArray(t)
checkType('compressSparseArray', 1, t, 'table')
local ret = {}
local nums = p.numKeys(t)
for _, num in ipairs(nums) do
ret[#ret + 1] = t[num]
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- sparseIpairs
--
-- This is an iterator for sparse arrays. It can be used like ipairs, but can
-- handle nil values.
------------------------------------------------------------------------------------
--]]
function p.sparseIpairs(t)
checkType('sparseIpairs', 1, t, 'table')
local nums = p.numKeys(t)
local i = 0
local lim = #nums
return function ()
i = i + 1
if i <= lim then
local key = nums[i]
return key, t[key]
else
return nil, nil
end
end
end
--[[
------------------------------------------------------------------------------------
-- size
--
-- This returns the size of a key/value pair table. It will also work on arrays,
-- but for arrays it is more efficient to use the # operator.
------------------------------------------------------------------------------------
--]]
function p.size(t)
checkType('size', 1, t, 'table')
local i = 0
for k in pairs(t) do
i = i + 1
end
return i
end
local function defaultKeySort(item1, item2)
-- "number" < "string", so numbers will be sorted before strings.
local type1, type2 = type(item1), type(item2)
if type1 ~= type2 then
return type1 < type2
else -- This will fail with table, boolean, function.
return item1 < item2
end
end
--[[
Returns a list of the keys in a table, sorted using either a default
comparison function or a custom keySort function.
]]
function p.keysToList(t, keySort, checked)
if not checked then
checkType('keysToList', 1, t, 'table')
checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' })
end
local list = {}
local index = 1
for key, value in pairs(t) do
list[index] = key
index = index + 1
end
if keySort ~= false then
keySort = type(keySort) == 'function' and keySort or defaultKeySort
table.sort(list, keySort)
end
return list
end
--[[
Iterates through a table, with the keys sorted using the keysToList function.
If there are only numerical keys, sparseIpairs is probably more efficient.
]]
function p.sortedPairs(t, keySort)
checkType('sortedPairs', 1, t, 'table')
checkType('sortedPairs', 2, keySort, 'function', true)
local list = p.keysToList(t, keySort, true)
local i = 0
return function()
i = i + 1
local key = list[i]
if key ~= nil then
return key, t[key]
else
return nil, nil
end
end
end
--[[
Returns true if all keys in the table are consecutive integers starting at 1.
--]]
function p.isArray(t)
checkType("isArray", 1, t, "table")
local i = 0
for k, v in pairs(t) do
i = i + 1
if t[i] == nil then
return false
end
end
return true
end
-- { "a", "b", "c" } -> { a = 1, b = 2, c = 3 }
function p.invert(array)
checkType("invert", 1, array, "table")
local map = {}
for i, v in ipairs(array) do
map[v] = i
end
return map
end
--[[
{ "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true }
--]]
function p.listToSet(t)
checkType("listToSet", 1, t, "table")
local set = {}
for _, item in ipairs(t) do
set[item] = true
end
return set
end
--[[
Recursive deep copy function.
Preserves identities of subtables.
]]
local function _deepCopy(orig, includeMetatable, already_seen)
-- Stores copies of tables indexed by the original table.
already_seen = already_seen or {}
local copy = already_seen[orig]
if copy ~= nil then
return copy
end
if type(orig) == 'table' then
copy = {}
for orig_key, orig_value in pairs(orig) do
copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen)
end
already_seen[orig] = copy
if includeMetatable then
local mt = getmetatable(orig)
if mt ~= nil then
local mt_copy = deepcopy(mt, includeMetatable, already_seen)
setmetatable(copy, mt_copy)
already_seen[mt] = mt_copy
end
end
else -- number, string, boolean, etc
copy = orig
end
return copy
end
function p.deepCopy(orig, noMetatable, already_seen)
checkType("deepCopy", 3, already_seen, "table", true)
return _deepCopy(orig, not noMetatable, already_seen)
end
--[[
Concatenates all values in the table that are indexed by a number, in order.
sparseConcat{ a, nil, c, d } => "acd"
sparseConcat{ nil, b, c, d } => "bcd"
]]
function p.sparseConcat(t, sep, i, j)
local list = {}
local list_i = 0
for _, v in p.sparseIpairs(t) do
list_i = list_i + 1
list[list_i] = v
end
return table.concat(list, sep, i, j)
end
--[[
-- This returns the length of a table, or the first integer key n counting from
-- 1 such that t[n + 1] is nil. It is similar to the operator #, but may return
-- a different value when there are gaps in the array portion of the table.
-- Intended to be used on data loaded with mw.loadData. For other tables, use #.
-- Note: #frame.args in frame object always be set to 0, regardless of
-- the number of unnamed template parameters, so use this function for
-- frame.args.
--]]
function p.length(t)
local i = 1
while t[i] ~= nil do
i = i + 1
end
return i - 1
end
function p.inArray(arr, valueToFind)
checkType("inArray", 1, arr, "table")
-- if valueToFind is nil, error?
for _, v in ipairs(arr) do
if v == valueToFind then
return true
end
end
return false
end
return p
fe918509f168332267834b3a6f5c219a9de5b2e7
Module:Yesno
828
28
53
2020-03-01T02:09:18Z
Minorax
10
8 revisions imported from [[:meta:Module:Yesno]]
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or val == 'on'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or val == 'off'
or tonumber(val) == 0
then
return false
else
return default
end
end
f767643e7d12126d020d88d662a3dd057817b9dc
Module:Documentation/styles.css
828
15
27
2020-10-25T15:49:33Z
Pppery
7
Protected "[[Module:Documentation/styles.css]]": Matching protection level with [[Module:Documentation]] ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
sanitized-css
text/css
.ts-doc-sandbox .mbox-image {
padding:.75em 0 .75em .75em;
}
.ts-doc-doc {
clear: both;
background-color: #eaf3ff;
border: 1px solid #a3caff;
margin-top: 1em;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.ts-doc-header {
background-color: #c2dcff;
padding: .642857em 1em .5em;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.ts-doc-header .ts-tlinks-tlinks {
line-height: 24px;
margin-left: 0;
}
.ts-doc-header .ts-tlinks-tlinks a.external {
color: #0645ad;
}
.ts-doc-header .ts-tlinks-tlinks a.external:visited {
color: #0b0080;
}
.ts-doc-header .ts-tlinks-tlinks a.external:active {
color: #faa700;
}
.ts-doc-content {
padding: .214286em 1em;
}
.ts-doc-content:after {
content: '';
clear: both;
display: block;
}
.ts-doc-heading {
display: inline-block;
padding-left: 30px;
background: center left/24px 24px no-repeat;
/* @noflip */
background-image: url(//upload.wikimedia.org/wikipedia/commons/f/fb/OOjs_UI_icon_puzzle-ltr.svg);
height: 24px;
line-height: 24px;
font-size: 13px;
font-weight: 600;
letter-spacing: 1px;
text-transform: uppercase;
}
.ts-doc-content > *:first-child,
.ts-doc-footer > *:first-child {
margin-top: .5em;
}
.ts-doc-content > *:last-child,
.ts-doc-footer > *:last-child {
margin-bottom: .5em;
}
.ts-doc-footer {
background-color: #eaf3ff;
border: 1px solid #a3caff;
padding: .214286em 1em;
margin-top: .214286em;
font-style: italic;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
@media all and (min-width: 720px) {
.ts-doc-header .ts-tlinks-tlinks {
float: right;
}
}
71b09af67524324bf70d203a0a724bc74ec6c82e
Template:Navbox with collapsible groups
10
78
154
2021-06-05T00:45:17Z
mediawikiwiki>Shirayuki
0
wikitext
text/x-wiki
{{#invoke:navbox|navbox
|name = {{{name|<noinclude>Navbox with collapsible groups</noinclude>}}}
|navbar = {{{navbar|}}}
|state = {{{state|<noinclude>uncollapsed</noinclude>}}}
|border = {{{border|{{{1|}}}}}}
|title = {{{title<includeonly>|</includeonly>}}}
|above = {{{above|}}}
|image = {{{image|}}}
|imageleft = {{{imageleft|}}}
|bodyclass = {{{bodyclass|}}}
|titleclass = {{{titleclass|}}}
|aboveclass = {{{aboveclass|}}}
|belowclass = {{{belowclass|}}}
|groupclass = {{{groupclass|}}}
|listclass = {{{listclass|}}}
|imageclass = {{{imageclass|}}}
|style = {{{style|}}}{{{bodystyle|}}}
|basestyle = {{{basestyle|}}}
|titlestyle = {{{titlestyle|}}}
|abovestyle = {{{abovestyle|}}}
|belowstyle = {{{belowstyle|}}}
|imagestyle = {{{imagestyle|}}}
|imageleftstyle = {{{imageleftstyle|}}}
|list1 =
{{#if:{{{group1<includeonly>|</includeonly>}}}{{{sect1|}}}{{{section1|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr1}}} |uncollapsed |{{{state1|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group1style|}}}{{{sect1titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list1style|}}}{{{content1style|}}}
|title = {{{group1<includeonly>|</includeonly>}}}{{{sect1|}}}{{{section1|}}}<noinclude> or {{{section1}}} or {{{sect1}}}</noinclude>
|list1 = {{{list1<includeonly>|</includeonly>}}}{{{content1|}}}<noinclude> or {{{content1}}}</noinclude>
|image = {{{image1|}}}
|imageleft = {{{imageleft1|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list1|}}}{{{content1|}}}
}}
|list2 =
{{#if:{{{group2<includeonly>|</includeonly>}}}{{{sect2|}}}{{{section2|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr2}}} |uncollapsed |{{{state2|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group2style|}}}{{{sect2titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list2style|}}}{{{content2style|}}}
|title = {{{group2<includeonly>|</includeonly>}}}{{{sect2|}}}{{{section2|}}}<noinclude> or {{{section2}}} or {{{sect2}}}</noinclude>
|list1 = {{{list2<includeonly>|</includeonly>}}}{{{content2|}}}<noinclude> or {{{content2}}}</noinclude>
|image = {{{image2|}}}
|imageleft = {{{imageleft2|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list2|}}}{{{content2|}}}
}}
|list3 =
{{#if:{{{group3<includeonly>|</includeonly>}}}{{{sect3|}}}{{{section3|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr3}}} |uncollapsed |{{{state3|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group3style|}}}{{{sect3titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list3style|}}}{{{content3style|}}}
|title = {{{group3<includeonly>|</includeonly>}}}{{{sect3|}}}{{{section3|}}}<noinclude> or {{{section3}}} or {{{sect3}}}</noinclude>
|list1 = {{{list3<includeonly>|</includeonly>}}}{{{content3|}}}<noinclude> or {{{content3}}}</noinclude>
|image = {{{image3|}}}
|imageleft = {{{imageleft3|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list3|}}}{{{content3|}}}
}}
|list4 =
{{#if:{{{group4<includeonly>|</includeonly>}}}{{{sect4|}}}{{{section4|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr4}}} |uncollapsed |{{{state4|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group4style|}}}{{{sect4titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list4style|}}}{{{content4style|}}}
|title = {{{group4<includeonly>|</includeonly>}}}{{{sect4|}}}{{{section4|}}}<noinclude> or {{{section4}}} or {{{sect4}}}</noinclude>
|list1 = {{{list4<includeonly>|</includeonly>}}}{{{content4|}}}<noinclude> or {{{content4}}}</noinclude>
|image = {{{image4|}}}
|imageleft = {{{imageleft4|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list4|}}}{{{content4|}}}
}}
|list5 =
{{#if:{{{group5<includeonly>|</includeonly>}}}{{{sect5|}}}{{{section5|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr5}}} |uncollapsed |{{{state5|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group5style|}}}{{{sect5titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list5style|}}}{{{content5style|}}}
|title = {{{group5<includeonly>|</includeonly>}}}{{{sect5|}}}{{{section5|}}}<noinclude> or {{{section5}}} or {{{sect5}}}</noinclude>
|list1 = {{{list5<includeonly>|</includeonly>}}}{{{content5|}}}<noinclude> or {{{content5}}}</noinclude>
|image = {{{image5|}}}
|imageleft = {{{imageleft5|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list5|}}}{{{content5|}}}
}}
|list6 =
{{#if:{{{group6|}}}{{{sect6|}}}{{{section6|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr6}}} |uncollapsed |{{{state6|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group6style|}}}{{{sect6titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list6style|}}}{{{content6style|}}}
|title = {{{group6|}}}{{{sect6|}}}{{{section6|}}}
|list1 = {{{list6|}}}{{{content6|}}}
|image = {{{image6|}}}
|imageleft = {{{imageleft6|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list6|}}}{{{content6|<noinclude>''(...etc, to group20/sect20/section20 and list20/content20)''</noinclude>}}}
}}
|list7 =
{{#if:{{{group7|}}}{{{sect7|}}}{{{section7|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr7}}} |uncollapsed |{{{state7|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group7style|}}}{{{sect7titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list7style|}}}{{{content7style|}}}
|title = {{{group7|}}}{{{sect7|}}}{{{section7|}}}
|list1 = {{{list7|}}}{{{content7|}}}
|image = {{{image7|}}}
|imageleft = {{{imageleft7|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list7|}}}{{{content7|}}}
}}
|list8 =
{{#if:{{{group8|}}}{{{sect8|}}}{{{section8|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr8}}} |uncollapsed |{{{state8|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group8style|}}}{{{sect8titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list8style|}}}{{{content8style|}}}
|title = {{{group8|}}}{{{sect8|}}}{{{section8|}}}
|list1 = {{{list8|}}}{{{content8|}}}
|image = {{{image8|}}}
|imageleft = {{{imageleft8|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list8|}}}{{{content8|}}}
}}
|list9 =
{{#if:{{{group9|}}}{{{sect9|}}}{{{section9|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr9}}} |uncollapsed |{{{state9|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group9style|}}}{{{sect9titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list9style|}}}{{{content9style|}}}
|title = {{{group9|}}}{{{sect9|}}}{{{section9|}}}
|list1 = {{{list9|}}}{{{content9|}}}
|image = {{{image9|}}}
|imageleft = {{{imageleft9|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list9|}}}{{{content9|}}}
}}
|list10 =
{{#if:{{{group10|}}}{{{sect10|}}}{{{section10|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr10}}} |uncollapsed |{{{state10|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group10style|}}}{{{sect10titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list10style|}}}{{{content10style|}}}
|title = {{{group10|}}}{{{sect10|}}}{{{section10|}}}
|list1 = {{{list10|}}}{{{content10|}}}
|image = {{{image10|}}}
|imageleft = {{{imageleft10|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list10|}}}{{{content10|}}}
}}
|list11 =
{{#if:{{{group11|}}}{{{sect11|}}}{{{section11|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr11}}} |uncollapsed |{{{state11|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group11style|}}}{{{sect11titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list11style|}}}{{{content11style|}}}
|title = {{{group11|}}}{{{sect11|}}}{{{section11|}}}
|list1 = {{{list11|}}}{{{content11|}}}
|image = {{{image11|}}}
|imageleft = {{{imageleft11|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list11|}}}{{{content11|}}}
}}
|list12 =
{{#if:{{{group12|}}}{{{sect12|}}}{{{section12|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr12}}} |uncollapsed |{{{state12|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group12style|}}}{{{sect12titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list12style|}}}{{{content12style|}}}
|title = {{{group12|}}}{{{sect12|}}}{{{section12|}}}
|list1 = {{{list12|}}}{{{content12|}}}
|image = {{{image12|}}}
|imageleft = {{{imageleft12|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list12|}}}{{{content12|}}}
}}
|list13 =
{{#if:{{{group13|}}}{{{sect13|}}}{{{section13|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr13}}} |uncollapsed |{{{state13|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group13style|}}}{{{sect13titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list13style|}}}{{{content13style|}}}
|title = {{{group13|}}}{{{sect13|}}}{{{section13|}}}
|list1 = {{{list13|}}}{{{content13|}}}
|image = {{{image13|}}}
|imageleft = {{{imageleft13|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list13|}}}{{{content13|}}}
}}
|list14 =
{{#if:{{{group14|}}}{{{sect14|}}}{{{section14|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr14}}} |uncollapsed |{{{state14|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group14style|}}}{{{sect14titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list14style|}}}{{{content14style|}}}
|title = {{{group14|}}}{{{sect14|}}}{{{section14|}}}
|list1 = {{{list14|}}}{{{content14|}}}
|image = {{{image14|}}}
|imageleft = {{{imageleft14|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list14|}}}{{{content14|}}}
}}
|list15 =
{{#if:{{{group15|}}}{{{sect15|}}}{{{section15|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr15}}} |uncollapsed |{{{state15|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group15style|}}}{{{sect15titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list15style|}}}{{{content15style|}}}
|title = {{{group15|}}}{{{sect15|}}}{{{section15|}}}
|list1 = {{{list15|}}}{{{content15|}}}
|image = {{{image15|}}}
|imageleft = {{{imageleft15|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list15|}}}{{{content15|}}}
}}
|list16 =
{{#if:{{{group16|}}}{{{sect16|}}}{{{section16|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr16}}} |uncollapsed |{{{state16|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group16style|}}}{{{sect16titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list16style|}}}{{{content16style|}}}
|title = {{{group16|}}}{{{sect16|}}}{{{section16|}}}
|list1 = {{{list16|}}}{{{content16|}}}
|image = {{{image16|}}}
|imageleft = {{{imageleft16|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list16|}}}{{{content16|}}}
}}
|list17 =
{{#if:{{{group17|}}}{{{sect17|}}}{{{section17|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr17}}} |uncollapsed |{{{state17|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group17style|}}}{{{sect17titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list17style|}}}{{{content17style|}}}
|title = {{{group17|}}}{{{sect17|}}}{{{section17|}}}
|list1 = {{{list17|}}}{{{content17|}}}
|image = {{{image17|}}}
|imageleft = {{{imageleft17|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list17|}}}{{{content17|}}}
}}
|list18 =
{{#if:{{{group18|}}}{{{sect18|}}}{{{section18|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr18}}} |uncollapsed |{{{state18|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group18style|}}}{{{sect18titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list18style|}}}{{{content18style|}}}
|title = {{{group18|}}}{{{sect18|}}}{{{section18|}}}
|list1 = {{{list18|}}}{{{content18|}}}
|image = {{{image18|}}}
|imageleft = {{{imageleft18|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list18|}}}{{{content18|}}}
}}
|list19 =
{{#if:{{{group19|}}}{{{sect19|}}}{{{section19|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr19}}} |uncollapsed |{{{state19|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group19style|}}}{{{sect19titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list19style|}}}{{{content19style|}}}
|title = {{{group19|}}}{{{sect19|}}}{{{section19|}}}
|list1 = {{{list19|}}}{{{content19|}}}
|image = {{{image19|}}}
|imageleft = {{{imageleft19|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list19|}}}{{{content19|}}}
}}
|list20 =
{{#if:{{{group20|}}}{{{sect20|}}}{{{section20|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr20}}} |uncollapsed |{{{state20|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group20style|}}}{{{sect20titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list20style|}}}{{{content20style|}}}
|title = {{{group20|}}}{{{sect20|}}}{{{section20|}}}
|list1 = {{{list20|}}}{{{content20|}}}
|image = {{{image20|}}}
|imageleft = {{{imageleft20|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list20|}}}{{{content20|}}}
}}
|below = {{{below|}}}
}}<noinclude>
{{documentation|content=
{{Lua|Module:navbox}}
}}
</noinclude>
74c4775f3e18e5a4275394f2669b82d5bddafe1a
Module:Lua banner/config
828
19
35
2021-06-26T17:30:02Z
mediawikiwiki>ExE Boss
0
Set `wish_category` to [[:Category:Lua-candidates|Lua-candidates]]
Scribunto
text/plain
local cfg = {} -- Don’t touch this line.
-- Subpage blacklist: these subpages will not be categorized (except for the
-- error category, which is always added if there is an error).
-- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have
-- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules,
-- so they *will* have categories. All rules should be in the
-- ['<subpage name>'] = true,
-- format.
cfg['subpage_blacklist'] = {
['doc'] = true,
['sandbox'] = true,
['sandbox2'] = true,
['testcases'] = true,
}
-- Allow wishes: whether wishes for conversion to Lua are allowed.
-- If true, calls with zero parameters are valid, and considered to be wishes:
-- The box’s text is “This template should use Lua”, and cfg['wish_category'] is
-- added. If false, such calls are invalid, an error message appears, and
-- cfg['error_category'] is added.
cfg['allow_wishes'] = false
-- Default category: this category is added if the module call contains errors
-- (e.g. no module listed). A category name without namespace, or nil
-- to disable categorization (not recommended).
cfg['error_category'] = 'Lua templates with errors'
-- Wish category: this category is added if no module is listed, and wishes are
-- allowed. (Not used if wishes are not allowed.) A category name without
-- namespace, or nil to disable categorization.
cfg['wish_category'] = 'Lua-candidates'
-- Default category: this category is added if none of the below module_categories
-- matches the first module listed. A category name without namespace, or nil
-- to disable categorization.
cfg['default_category'] = 'Lua-based templates'
-- Module categories: one of these categories is added if the first listed module
-- is the listed module (e.g. {{Lua|Module:String}} adds
-- [[Category:Lua String-based templates]].) Format:
-- ['<module name>'] = '<category name>'
-- where neither <module name> nor <category name> contains namespace. An empty
-- table (i.e. no module-based categorization) will suffice on smaller wikis.
cfg['module_categories'] = {
['String'] = 'Lua String-based templates',
}
return cfg -- Don’t touch this line.
960aa5bb0f008cf7e3ef37963e1dbc797c2ffdd5
Module:Lua banner
828
18
33
2021-06-26T17:46:56Z
mediawikiwiki>ExE Boss
0
Fix `wish` parameter
Scribunto
text/plain
-- This module implements the {{lua}} template.
local yesno = require('Module:Yesno')
local mList = require('Module:List')
local mTableTools = require('Module:TableTools')
local mMessageBox = require('Module:Message box')
local TNT = require('Module:TNT')
local p = {}
local function format(msg)
return TNT.format('I18n/Lua banner', msg)
end
local function getConfig()
return mw.loadData('Module:Lua banner/config')
end
function p.main(frame)
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
v = v:match('^%s*(.-)%s*$')
if v ~= '' then
args[k] = v
end
end
return p._main(args)
end
function p._main(args, cfg)
local modules = mTableTools.compressSparseArray(args)
local box = p.renderBox(modules, cfg, args)
local trackingCategories = p.renderTrackingCategories(args, modules, nil, cfg)
return box .. trackingCategories
end
function p.renderBox(modules, cfg, args)
local boxArgs = {}
if #modules < 1 then
cfg = cfg or getConfig()
if cfg['allow_wishes'] or yesno(args and args.wish) then
boxArgs.text = format('wishtext')
else
boxArgs.text = string.format('<strong class="error">%s</strong>', format('error_emptylist'))
end
else
local moduleLinks = {}
for i, module in ipairs(modules) do
moduleLinks[i] = string.format('[[:%s]]', module)
end
local moduleList = mList.makeList('bulleted', moduleLinks)
boxArgs.text = format('header') .. '\n' .. moduleList
end
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = string.format(
'[[File:Lua-logo-nolabel.svg|30px|alt=%s|link=%s]]',
format('logo_alt'),
format('logo_link')
)
return mMessageBox.main('mbox', boxArgs)
end
function p.renderTrackingCategories(args, modules, titleObj, cfg)
if yesno(args.nocat) then
return ''
end
cfg = cfg or getConfig()
local cats = {}
-- Error category
if #modules < 1 and not (cfg['allow_wishes'] or yesno(args.wish)) and cfg['error_category'] then
cats[#cats + 1] = cfg['error_category']
end
-- Lua templates category
titleObj = titleObj or mw.title.getCurrentTitle()
if titleObj.namespace == 10
and not cfg['subpage_blacklist'][titleObj.subpageText]
then
local category = args.category
if not category then
local pagename = modules[1] and mw.title.new(modules[1])
category = pagename and cfg['module_categories'][pagename.text]
if not category then
if (cfg['allow_wishes'] or yesno(args.wish)) and #modules < 1 then
category = cfg['wish_category']
else
category = cfg['default_category']
end
end
end
if category then
cats[#cats + 1] = category
end
end
for i, cat in ipairs(cats) do
cats[i] = string.format('[[Category:%s]]', cat)
end
return table.concat(cats)
end
return p
4b55b48bd92caeb84decde5f14c77b68ae09653e
Template:Lua
10
30
57
2021-07-04T05:28:53Z
mediawikiwiki>ExE Boss
0
Use <[[mw:Special:MyLanguage/Help:Transclusion#<onlyinclude>|onlyinclude]]>
wikitext
text/x-wiki
<onlyinclude><includeonly>{{#invoke:Lua banner|main}}</includeonly></onlyinclude>
{{Lua|Module:Lua banner}}
{{Documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
4642b0a145984533bddd3a6f0293c56ce201b88d
Module:Navbar/styles.css
828
52
101
2021-07-06T14:11:18Z
mediawikiwiki>ExE Boss
0
/* top */ Add {{[[Template:Shared Template Warning|Shared Template Warning]]}}
sanitized-css
text/css
/** {{Shared Template Warning}}
* This TemplateStyles page is separately used for [[Template:Navbar]]
* because of course there are two versions of the same template.
* Be careful when adjusting styles accordingly.
*/
.navbar {
display: inline;
font-size: 88%;
font-weight: normal;
}
.navbar ul {
display: inline;
white-space: nowrap;
}
.navbar li {
word-spacing: -0.125em;
}
/* Navbar styling when nested in navbox */
.navbox .navbar {
display: block;
font-size: 100%;
}
.navbox-title .navbar {
/* @noflip */
float: left;
/* @noflip */
text-align: left;
/* @noflip */
margin-right: 0.5em;
width: 6em;
}
daa254bc716c42f79e6be78a9d0a82bdbe57f9f2
Module:Message box/ombox.css
828
22
41
2021-07-15T19:28:43Z
mediawikiwiki>ExE Boss
0
Fix {{[[Template:Ombox|Ombox]]|small=1}} styles comment
sanitized-css
text/css
/**
* {{ombox}} (other pages message box) styles
*
* @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css
* @revision 2021-07-15
*/
table.ombox {
margin: 4px 10%;
border-collapse: collapse;
/* Default "notice" gray */
border: 1px solid #a2a9b1;
background-color: #f8f9fa;
box-sizing: border-box;
}
/* An empty narrow cell */
.ombox td.mbox-empty-cell {
border: none;
padding: 0;
width: 1px;
}
/* The message body cell(s) */
.ombox th.mbox-text,
.ombox td.mbox-text {
border: none;
/* 0.9em left/right */
padding: 0.25em 0.9em;
/* Make all mboxes the same width regardless of text length */
width: 100%;
}
/* The left image cell */
.ombox td.mbox-image {
border: none;
text-align: center;
/* 0.9em left, 0px right */
/* @noflip */
padding: 2px 0 2px 0.9em;
}
/* The right image cell */
.ombox td.mbox-imageright {
border: none;
text-align: center;
/* 0px left, 0.9em right */
/* @noflip */
padding: 2px 0.9em 2px 0;
}
table.ombox-notice {
/* Gray */
border-color: #a2a9b1;
}
table.ombox-speedy {
/* Pink */
background-color: #fee7e6;
}
table.ombox-speedy,
table.ombox-delete {
/* Red */
border-color: #b32424;
border-width: 2px;
}
table.ombox-content {
/* Orange */
border-color: #f28500;
}
table.ombox-style {
/* Yellow */
border-color: #fc3;
}
table.ombox-move {
/* Purple */
border-color: #9932cc;
}
table.ombox-protection {
/* Gray-gold */
border-color: #a2a9b1;
border-width: 2px;
}
/**
* {{ombox|small=1}} styles
*
* These ".mbox-small" classes must be placed after all other
* ".ombox" classes. "html body.mediawiki .ombox"
* is so they apply only to other page message boxes.
*
* @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css
* @revision 2021-07-15
*/
/* For the "small=yes" option. */
html body.mediawiki .ombox.mbox-small {
clear: right;
float: right;
margin: 4px 0 4px 1em;
box-sizing: border-box;
width: 238px;
font-size: 88%;
line-height: 1.25em;
}
e2c21da9b2e5ea3a68e2f5a7432cbfd3cfce80a8
Module:List
828
17
31
2021-07-18T08:36:59Z
mediawikiwiki>ExE Boss
0
Only use main <div> tag when necessary
Scribunto
text/plain
-- This module outputs different kinds of lists. At the moment, bulleted,
-- unbulleted, horizontal, ordered, and horizontal ordered lists are supported.
local libUtil = require('libraryUtil')
local checkType = libUtil.checkType
local mTableTools = require('Module:TableTools')
local p = {}
local listTypes = {
['bulleted'] = true,
['unbulleted'] = true,
['horizontal'] = true,
['ordered'] = true,
['horizontal_ordered'] = true
}
function p.makeListData(listType, args)
-- Constructs a data table to be passed to p.renderList.
local data = {}
-- Classes
data.classes = {}
data.templatestyles = ''
if listType == 'horizontal' or listType == 'horizontal_ordered' then
table.insert(data.classes, 'hlist')
data.templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Flatlist/styles.css' }
}
elseif listType == 'unbulleted' then
table.insert(data.classes, 'plainlist')
data.templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Plainlist/styles.css' }
}
end
table.insert(data.classes, args.class)
-- Main div style
data.style = args.style
-- Indent for horizontal lists
if listType == 'horizontal' or listType == 'horizontal_ordered' then
local indent = tonumber(args.indent)
indent = indent and indent * 1.6 or 0
if indent > 0 then
data.marginLeft = indent .. 'em'
end
end
-- List style types for ordered lists
-- This could be "1, 2, 3", "a, b, c", or a number of others. The list style
-- type is either set by the "type" attribute or the "list-style-type" CSS
-- property.
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listStyleType = args.list_style_type or args['list-style-type']
data.type = args['type']
-- Detect invalid type attributes and attempt to convert them to
-- list-style-type CSS properties.
if data.type
and not data.listStyleType
and not tostring(data.type):find('^%s*[1AaIi]%s*$')
then
data.listStyleType = data.type
data.type = nil
end
end
-- List tag type
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listTag = 'ol'
else
data.listTag = 'ul'
end
-- Start number for ordered lists
data.start = args.start
if listType == 'horizontal_ordered' then
-- Apply fix to get start numbers working with horizontal ordered lists.
local startNum = tonumber(data.start)
if startNum then
data.counterReset = 'listitem ' .. tostring(startNum - 1)
end
end
-- List style
-- ul_style and ol_style are included for backwards compatibility. No
-- distinction is made for ordered or unordered lists.
data.listStyle = args.list_style
-- List items
-- li_style is included for backwards compatibility. item_style was included
-- to be easier to understand for non-coders.
data.itemStyle = args.item_style or args.li_style
data.items = {}
for i, num in ipairs(mTableTools.numKeys(args)) do
local item = {}
item.content = args[num]
item.style = args['item' .. tostring(num) .. '_style']
or args['item_style' .. tostring(num)]
item.value = args['item' .. tostring(num) .. '_value']
or args['item_value' .. tostring(num)]
table.insert(data.items, item)
end
return data
end
function p.renderList(data)
-- Renders the list HTML.
-- Return the blank string if there are no list items.
if type(data.items) ~= 'table' or #data.items < 1 then
return ''
end
-- Render the main div tag.
local root = mw.html.create((
#data.classes > 0
or data.marginLeft
or data.style
) and 'div' or nil)
for i, class in ipairs(data.classes or {}) do
root:addClass(class)
end
root:css{['margin-left'] = data.marginLeft}
if data.style then
root:cssText(data.style)
end
-- Render the list tag.
local list = root:tag(data.listTag or 'ul')
list
:attr{start = data.start, type = data.type}
:css{
['counter-reset'] = data.counterReset,
['list-style-type'] = data.listStyleType
}
if data.listStyle then
list:cssText(data.listStyle)
end
-- Render the list items
for i, t in ipairs(data.items or {}) do
local item = list:tag('li')
if data.itemStyle then
item:cssText(data.itemStyle)
end
if t.style then
item:cssText(t.style)
end
item
:attr{value = t.value}
:wikitext(t.content)
end
return data.templatestyles .. tostring(root)
end
function p.makeList(listType, args)
if not listType or not listTypes[listType] then
error(string.format(
"bad argument #1 to 'makeList' ('%s' is not a valid list type)",
tostring(listType)
), 2)
end
checkType('makeList', 2, args, 'table')
local data = p.makeListData(listType, args)
return p.renderList(data)
end
for listType in pairs(listTypes) do
p[listType] = function (frame)
local mArguments = require('Module:Arguments')
local origArgs = mArguments.getArgs(frame)
-- Copy all the arguments to a new table, for faster indexing.
local args = {}
for k, v in pairs(origArgs) do
args[k] = v
end
return p.makeList(listType, args)
end
end
return p
d701c0798e541793aa5ed1e9af50fc3b20548907
Template:Tmpl
10
80
158
2021-08-08T13:43:06Z
mediawikiwiki>ExE Boss
0
/* template-documentation */ Use {{[[mw:Special:MyLanguage/Help:Substitution|subst]]:[[Template:InitDoc|InitDoc]]}}
wikitext
text/x-wiki
<onlyinclude><includeonly>{{#invoke:Tmpl|renderTmpl}}</includeonly></onlyinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
c29b0448e5b4220ef09fba833ddabdebb7b41ceb
Template:Mbox
10
76
150
2021-09-02T04:13:09Z
mediawikiwiki>Taavi
0
apparently not needed anymore
wikitext
text/x-wiki
{{#invoke:Message box|mbox}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
c262e205f85f774a23f74119179ceea11751d68e
Template:Navbar
10
77
152
2022-02-12T23:57:50Z
mediawikiwiki>Shirayuki
0
new tvar syntax
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude><templatestyles src="Module:Navbar/styles.css"/><span class="noprint plainlinks navbar" style="{{{style|}}}"><small><!--
-->{{#if:{{{mini|}}}{{{plain|}}}|<!--nothing-->|<!--else:
--><span style="{{{fontstyle|}}}">{{#if:{{{text|}}}|{{{text}}}|<translate><!--T:1--> This box:</translate>}} </span>}}<!--
-->{{#if:{{{brackets|}}}|<span style="{{{fontstyle|}}}">[</span>}}<!--
--><span style="white-space:nowrap;word-spacing:-.12em;"><!--
-->[[{{transclude|{{{1}}}}}|<span style="{{{fontstyle|}}}" title="<translate nowrap><!--T:2--> View this template</translate>"><!--
-->{{#if:{{{mini|}}}|<translate><!--T:3--> v</translate>|<translate><!--T:4--> view</translate>}}</span>]]<!--
--><span style="{{{fontstyle|}}}"> <b>·</b> </span><!--
-->[{{fullurl:{{<noinclude><nowiki/></noinclude>TALKPAGENAME:{{transclude|{{{1}}}}}}}}} <span style="{{{fontstyle|}}}" title="<translate nowrap><!--T:9--> Discuss this template</translate>"><!--
-->{{#if:{{{mini|}}}|<translate><!--T:5--> d</translate>|<translate><!--T:6--> talk</translate>}}</span>]<!--
-->{{#if:{{{noedit|}}}|<!--nothing-->|<!--else:
--><span style="{{{fontstyle|}}}"> <b>·</b> </span><!--
-->[{{fullurl:{{transclude|{{{1}}}}}|action=edit}} <span style="{{{fontstyle|}}}" title="<translate nowrap><!--T:10--> Edit this template</translate>"><!--
-->{{#if:{{{mini|}}}|<translate><!--T:7--> e</translate>|<translate><!--T:8--> edit</translate>}}</span>]}}<!--
--></span><!--
-->{{#if:{{{brackets|}}}|<span style="{{{fontstyle|}}}">]</span>}}<!--
--></small></span><noinclude>
{{Documentation|content=
{{Uses TemplateStyles|Module:Navbar/styles.css}}
<translate>
== Usage == <!--T:11-->
=== General === <!--T:12-->
<!--T:13-->
When one of the following examples is placed inside a given [[<tvar name=1>Special:MyLanguage/Help:Templates</tvar>|template]], it adds navbar navigational functionality:
</translate>
: {{tlx|Navbar|Navbar|mini{{=}}1}}
: {{tlx|Navbar|Navbar|plain{{=}}1}}
: {{tlx|Navbar|Navbar|fontstyle{{=}}color:green}}
<translate><!--T:14--> The <tvar name=1><code><nowiki>{{subst:PAGENAME}}</nowiki></code></tvar> will be substituted with the template's name when parsed by the servers.</translate>
<translate><!--T:15--> For example, <tvar name=1>{{tlx|Navbar|navbar/doc}}</tvar> gives:</translate>
{{Navbar|navbar/doc}}
<translate>
=== Font-size === <!--T:16-->
</translate>
<translate><!--T:17--> Font-size is <tvar name=1><code>88%</code></tvar> when used in a navbar, and <tvar name=2><code>100%</code></tvar> when nested in a navbox.</translate>
<translate><!--T:18--> In the navbar, the weight is "<tvar name=1><code>normal</code></tvar>"; when nested in navbox, it takes on the outer setting.</translate>
<translate><!--T:19--> The middot is bold.</translate>
<translate>
== Examples == <!--T:20-->
=== Required parameters === <!--T:21-->
</translate>
* {{tlx|Navbar|''<translate><!--T:22--> template name</translate>''}} — <translate><!--T:23--> the template name is required.</translate>
<translate>
=== Optional parameters === <!--T:24-->
</translate>
{{(}}{{!}} class="wikitable"
! <translate><!--T:25--> Options</translate>
! <translate><!--T:26--> Parameters</translate>
! <translate><!--T:27--> Produces...</translate>
{{!}}-
{{!}} <translate><!--T:28--> Basic</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:29--> template name</translate>''}}
{{!}} {{navbar|navbar/doc}}
{{!}}-
{{!}} <translate><!--T:30--> Different text</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:31--> template name</translate>''|3=text{{=}}<translate><!--T:32--> This template:</translate>}}
{{!}} {{navbar|navbar/doc|text=<translate><!--T:33--> This template:</translate>}}
{{!}}-
{{!}} <translate><!--T:34--> Without "This box:" text</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:35--> template name</translate>''|3=plain{{=}}1}}
{{!}} {{navbar|navbar/doc|plain=1}}
{{!}}-
{{!}} <translate><!--T:36--> Short version</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:37--> template name</translate>''|3=mini{{=}}1}}
{{!}} {{navbar|navbar/doc|mini=1}}
{{!}}-
{{!}} <translate><!--T:38--> With a color option</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:39--> template name</translate>''|3=fontstyle{{=}}color:green}}
{{!}} {{navbar|navbar/doc|fontstyle=color:green}}
{{!}}-
{{!}} <translate><!--T:40--> With brackets</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:41--> template name</translate>''|3=brackets{{=}}1}}
{{!}} {{navbar|navbar/doc|brackets=1}}
{{!}}-
{{!}} <translate><!--T:45--> Custom namespace</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:46--> namespaced template name</translate>''|3=plain{{=}}1|4=brackets{{=}}1}}
{{!}} {{navbar|User:Example|plain=1|brackets=1}}
{{!}}{{)}}
== TemplateData ==
{{Navbar/doc}}
<translate>
== Notes == <!--T:42-->
</translate>
<translate><!--T:43--> Navbar is contained within a <tvar name=1>{{tag|div}}</tvar> in order to accommodate a horizontal unnumbered list.</translate>
<translate><!--T:44--> This means it cannot be placed inside a <tvar name=1>{{tag|span}}</tvar> or other inline element, because Tidy will 'fix' situations where it finds block elements inside inline elements.</translate>
<!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE --->
<includeonly>
[[Category:Formatting templates{{#translation:}}]]
</includeonly>
}}
</noinclude>
5e5af5638e20e93d6f7d25d32f1e0d811b3b601f
Template:Tl
10
49
95
2022-02-26T04:13:26Z
mediawikiwiki>Shirayuki
0
wikitext
text/x-wiki
{{((}}[[Template:{{{1}}}|{{{1}}}]]{{))}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
1447a15b7ca7f93848d1ac4b792d61a1d8555e3b
Template:Translatable
10
81
160
2022-05-07T02:53:36Z
mediawikiwiki>Shirayuki
0
simplify
wikitext
text/x-wiki
<noinclude>
<languages />
</noinclude>{{#ifeq:{{pagelang|{{{1|{{FULLPAGENAME}}}}}}}|
|{{{1|{{FULLPAGENAME}}}}}
|{{#invoke:String|sub|{{{1|{{FULLPAGENAME}}}}}
|1
|{{#expr:{{#invoke:String|len|{{{1|{{FULLPAGENAME}}}}}}}-{{#invoke:String|len|{{pagelang|{{{1|{{FULLPAGENAME}}}}}}}}}-1}}
}}
}}<noinclude>
{{Documentation|content=
{{Lua|Module:String}}
<translate>
== Examples == <!--T:1-->
</translate>
* {{tlx|translatable}}
{{translatable}}
* {{tlx|translatable|2=<translate><!--T:2--> Page name</translate>}}
{{translatable|1=<translate><!--T:3--> Page name</translate>}}
* {{tlx|translatable|2=<translate><!--T:4--> Page name</translate>/{{PAGELANGUAGE}} }}
{{translatable|1=<translate><!--T:5--> Page name</translate>/{{PAGELANGUAGE}} }}
}}
[[Category:Internationalization templates{{#translation:}}]]
</noinclude>
76f8f4907f2c12144291f6adc98a40cc2cc4061f
Template:Tim
10
34
65
2022-06-23T08:07:13Z
mediawikiwiki>Mtarch11
0
Reverted edits by [[Special:Contribs/118.148.83.155|118.148.83.155]] ([[User talk:118.148.83.155|talk]]) to last version by Damenleeturks
wikitext
text/x-wiki
[[m:Template:{{{1|{{PAGENAME}}}}}]]<noinclude>
{{documentation|content=
Displays a link to a template on Meta.
* {{xpds|tim|foo}}
[[Category:Shortcut templates|{{PAGENAME}}]]
[[Category:External link templates]]}}</noinclude>
2bed05d802e6f826c40c07ef66c9e0df72d4028d
Template:IsDocSubpage
10
43
83
2022-07-13T12:02:25Z
mediawikiwiki>Tacsipacsi
0
use {{#translation:}}—it handles manual translations as well
wikitext
text/x-wiki
<onlyinclude><includeonly>{{#ifexpr: (
{{#ifeq:{{lc:{{SUBPAGENAME}}}}|{{lc:{{{override|doc}}}}}|1|0}} or (
{{#ifeq:{{lc:{{#titleparts:{{FULLPAGENAME}}|-1|-2}}}}|{{lc:{{{override|doc}}}}}|1|0}}
and {{#if:{{#translation:}}|1|0}}
)
)<!--
-->|{{{true|1}}}<!--
-->|{{{false|}}}<!--
-->}}</includeonly></onlyinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
47b5d5a2fb89240a721f8874924170f791de93b2
Template:((
10
35
67
2022-10-03T21:35:27Z
mediawikiwiki>Clump
0
Protected "[[Template:((]]": Highly visible page or template ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
wikitext
text/x-wiki
{{<noinclude>
{{documentation}}[[Category:Workaround templates]]
</noinclude>
f8c63100e113b89d20396b75811d33e13b808f1a
Template:Navbox/doc
10
44
85
2022-10-23T18:59:48Z
mediawikiwiki>ENeRZet
0
text editing
wikitext
text/x-wiki
{{documentation subpage}}
{{lua|Module:Navbox}}
{{High-risk}}
This template allows a [[Help:Templates|navigational template]] to be set up relatively quickly by supplying it one or more lists of links. It comes equipped with default styles that should work for most navigational templates. Changing the default styles is not recommended, but is possible. Using this template, or one of its "Navbox suite" sister templates, is highly recommended for standardization of navigational templates, and for ease of use.
== Usage ==
Please remove the parameters that are left blank.
<pre style="overflow:auto;">{{Navbox
|bodyclass =
|name = {{subst:PAGENAME}}
|title =
|titlestyle =
|image =
|above =
|group1 =
|list1 =
|group2 =
|list2 =
...
|group20 =
|list20 =
|below =
}}</pre>
== Parameter list ==
{{Navbox
|name = {{BASEPAGENAME}}
|state = uncollapsed
|image = {{{image}}}
|title = {{{title}}}
|above = {{{above}}}
|group1 = {{{group1}}}
|list1 = {{{list1}}}
|group2 = {{{group2}}}
|list2 = {{{list2}}}
|list3 = {{{list3}}} ''without {{{group3}}}''
|group4 = {{{group4}}}
|list4 = {{{list4}}}
|below = {{{below}}}<br />See alternate navbox formats under: [[#Layout of table|''Layout of table'']]
}}
The navbox uses lowercase parameter names, as shown in the box (''at right''). The mandatory ''name'' and ''title'' will create a one-line box if other parameters are omitted.
Notice "group1" (etc.) is optional, as are sections named "above/below".
{{-}}
The basic and most common parameters are as follows (see below for the full list):
:<code>bodyclass -</code> applies an HTML <code>class</code> attribute to the entire navbox.
:<code>name -</code> the name of the template.
:<code>title -</code> text in the title bar, such as: <nowiki>[[Widget stuff]]</nowiki>.
:<code>titleclass -</code> applies an HTML <code>class</code> attribute to the title bar.
:<code>state - autocollapse, uncollapsed, collapsed</code>: the status of box expansion, where "autocollapse" hides stacked navboxes automatically.
:<code>titlestyle - </code>a CSS style for the title-bar, such as: <code>background:gray;</code>
:<code>groupstyle - </code>a CSS style for the group-cells, such as: <code>background:#eee;</code>
:<code>image - </code>an optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as <code><nowiki>[[Image:</nowiki><var>XX</var><nowiki>.jpg|90px|link=|alt=]]</nowiki></code>.
:<code>imageleft - </code>an optional left-side image (code the same as the "image" parameter).
:<code>above - </code>text to appear above the group/list section (could be a list of overall wikilinks).
:<code>group<sub>n</sub> - </code>the left-side text before list-n (if group-n omitted, list-n starts at left of box).
:<code>list<sub>n</sub> - </code>text listing wikilinks, often separated by middot templates, such as: [<nowiki />[A]]<code>{<nowiki />{·}}</code> [<nowiki />[B]]
:<code>below - </code>optional text to appear below the group/list section.
Further details, and complex restrictions, are explained below under section ''[[#Parameter descriptions|Parameter descriptions]]''. See some alternate navbox formats under: [[#Layout of table|''Layout of table'']].
== Parameter descriptions ==
The following is a complete list of parameters for using {{tl|Navbox}}. In most cases, the only required parameters are <code>name</code>, <code>title</code>, and <code>list1</code>, though [[Template:Navbox/doc#Child navboxes|child navboxes]] do not even require those to be set.
{{tl|Navbox}} shares numerous common parameter names as its sister templates {{tl|Navbox with columns}} and {{tl|Navbox with collapsible groups}} for consistency and ease of use. Parameters marked with an asterisk <nowiki>*</nowiki> are common to all three master templates.
=== Setup parameters ===
:; ''name''<nowiki>*</nowiki>
:: The name of the template, which is needed for the "v{{·}} d{{·}} e" ("view{{·}} discuss{{·}} edit") links to work properly on all pages where the template is used. You can enter <code><nowiki>{{subst:PAGENAME}}</nowiki></code> for this value as a shortcut. The name parameter is only mandatory if a <code>title</code> is specified, and the <code>border</code> parameter is not set.
:; ''state''<nowiki>*</nowiki> <span style="font-weight:normal;">[<code>autocollapse, uncollapsed, collapsed, plain, off</code>]</span>
:* Defaults to <code>autocollapse</code>. A navbox with <code>autocollapse</code> will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded. For the technically minded, see {{Blue|MediaWiki:Common.js}}.
:* If set to <code>collapsed</code>, the navbox will always start out in a collapsed state.
:* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the <small>v • d • e</small> links).
:* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden.
:*If set to anything other than <code>autocollapse</code>, <code>collapsed</code>, <code>plain</code>, or <code>off</code> (such as "uncollapsed"), the navbox will always start out in an expanded state, but have the "hide" button.
: To show the box when standalone (non-included) but then auto-hide contents when in an article, put "uncollapsed" inside <noinclude> tags:
:* <code>state = </code><nowiki><noinclude>uncollapsed</noinclude></nowiki>
:* That setting will force the box visible when standalone (even when followed by other boxes), displaying "[hide]" but then auto-collapse the box when stacked inside an article.
: Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this:
:*In your intermediate template, create a parameter also named "state" as a pass-through like this:
:*<code><nowiki>| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}</nowiki></code>
:*The <nowiki><includeonly>|</nowiki> will make the template expanded when viewing the template page by itself.
:; ''navbar''<nowiki>*</nowiki>
:: Defaults to <code>Tnavbar</code>. If set to <code>plain</code>, the <small>v • d • e</small> links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use <code>off</code> to remove the <small>v • d • e</small> links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). Note that it is highly recommended that one does not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages.
:; ''border''<nowiki>*</nowiki>
:: ''See section below on using navboxes within one another for examples and a more complete description.'' If set to <code>child</code> or <code>subgroup</code>, then the navbox can be used as a borderless child that fits snuggly in another navbox. The border is hidden and there is no padding on the sides of the table, so it fits into the ''list'' area of its parent navbox. If set to <code>none</code>, then the border is hidden and padding is removed, and the navbox may be used as a child of another container (do not use the <code>none</code> option inside of another navbox; similarly, only use the <code>child</code>/<code>subgroup</code> option inside of another navbox). If set to anything else (default), then a regular navbox is displayed with a 1px border. An alternate way to specify the border to be a subgroup style is like this (i.e. use the first unnamed parameter instead of the named ''border'' parameter):
:::<code><nowiki>{{Navbox|child</nowiki></code>
::::<code>...</code>
:::<code><nowiki>}}</nowiki></code>
=== Cells ===
:; ''title''<nowiki>*</nowiki>
:: Text that appears centered in the top row of the table. It is usually the template's topic, i.e. a succinct description of the body contents. This should be a single line, but if a second line is needed, use <code><nowiki>{{-}}</nowiki></code> to ensure proper centering. This parameter is technically not mandatory, but using {{tl|Navbox}} is rather pointless without a title.
:; ''group<sub>n</sub>''<nowiki>*</nowiki>
:: (i.e. ''group1'', ''group2'', etc.) If specified, text appears in a header cell displayed to the left of ''list<sub>n</sub>''. If omitted, ''list<sub>n</sub>'' uses the full width of the table.
:; ''list<sub>n</sub>''<nowiki>*</nowiki>
:: (i.e. ''list1'', ''list2'', etc.) The body of the template, usually a list of links. Format is inline, although the text can be entered on separate lines if the entire list is enclosed within <code><nowiki><div> </div></nowiki></code>. At least one ''list'' parameter is required; each additional ''list'' is displayed in a separate row of the table. Each ''list<sub>n</sub>'' may be preceded by a corresponding ''group<sub>n</sub>'' parameter, if provided (see below).
:; ''image''<nowiki>*</nowiki>
:: An image to be displayed in a cell below the title and to the right of the body (the groups/lists). For the image to display properly, the ''list1'' parameter must be specified. The ''image'' parameter accepts standard wikicode for displaying an image, ''e.g.'':
::: <code><nowiki>[[Image:</nowiki><var>XX</var><nowiki>.jpg|90px|link=|alt=]]</nowiki></code>
:; ''imageleft''<nowiki>*</nowiki>
:: An image to be displayed in a cell below the title and to the left of the body (lists). For the image to display properly, the ''list1'' parameter must be specified and no groups can be specified. It accepts the same sort of parameter that ''image'' accepts.
:; ''above''<nowiki>*</nowiki>
:: A full-width cell displayed between the titlebar and first group/list, i.e. ''above'' the template's body (groups, lists and image). In a template without an image, ''above'' behaves in the same way as the ''list1'' parameter without the ''group1'' parameter.
:; ''below''<nowiki>*</nowiki>
:: A full-width cell displayed ''below'' the template's body (groups, lists and image). In a template without an image, ''below'' behaves in the same way as the template's final ''list<sub>n</sub>'' parameter without a ''group<sub>n</sub>'' parameter.
=== Style parameters ===
Styles are generally not recommended as to maintain consistency among templates and pages in Wikipedia. However, the option to modify styles is given.
:; ''style''<nowiki>*</nowiki>
:: Specifies CSS styles to apply to the template body. The parameter ''bodystyle'' also does the example same thing and can be used in place of this ''style'' parameter. This option should be used sparingly as it can lead to visual inconsistencies. Examples:
::: <code>style = background:#''nnnnnn'';</code>
::: <code>style = width:''N'' [em/%/px or width:auto];</code>
::: <code>style = float:[''left/right/none''];</code>
::: <code>style = clear:[''right/left/both/none''];</code>
:; ''basestyle''<nowiki>*</nowiki>
:: CSS styles to apply to the ''title'', ''above'', ''below'', and ''group'' cells all at once. The style are not applied to ''list'' cells. This is convenient for easily changing the basic color of the navbox without having to repeat the style specifications for the different parts of the navbox. Examples:
::: <code>basestyle = background:lightskyblue;</code>
:; ''titlestyle''<nowiki>*</nowiki>
:: CSS styles to apply to ''title'', most often the titlebar's background color:
::: <code><nowiki>titlestyle = background:</nowiki>''#nnnnnn'';</code>
::: <code><nowiki>titlestyle = background:</nowiki>''name'';</code>
:; ''groupstyle''<nowiki>*</nowiki>
:: CSS styles to apply to the ''groupN'' cells. This option overrides any styles that are applied to the entire table. Examples:
::: <code>groupstyle = background:#''nnnnnn'';</code>
::: <code>groupstyle = text-align:[''left/center/right''];</code>
::: <code>groupstyle = vertical-align:[''top/middle/bottom''];</code>
:; ''group<sub>n</sub>style''<nowiki>*</nowiki>
:: CSS styles to apply to a specific group, in addition to any styles specified by the ''groupstyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Examples:
::: <code>group3style = background:red;color:white;</code>
:; ''liststyle''<nowiki>*</nowiki>
:: CSS styles to apply to all lists. Overruled by the ''oddstyle'' and ''evenstyle'' parameters (if specified) below. When using backgound colors in the navbox, see the [[#Intricacies|note below]].
:; ''list<sub>n</sub>style''<nowiki>*</nowiki>
:: CSS styles to apply to a specific list, in addition to any styles specified by the ''liststyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Examples:
::: <code>list5style = background:#ddddff;</code>
:; ''listpadding''<nowiki>*</nowiki>
:: A number and unit specifying the padding in each ''list'' cell. The ''list'' cells come equipped with a default padding of 0.25em on the left and right, and 0em on the top and bottom. Due to complex technical reasons, simply setting "liststyle=padding:0.5em;" (or any other padding setting) will not work. Examples:
::: <code>listpadding = 0.5em 0em; </code> (sets 0.5em padding for the left/right, and 0em padding for the top/bottom.)
::: <code>listpadding = 0em; </code> (removes all list padding.)
:; ''oddstyle''
:; ''evenstyle''
::Applies to odd/even list numbers. Overrules styles defined by ''liststyle''. The default behavior is to add striped colors (white and gray) to odd/even rows, respectively, in order to improve readability. These should not be changed except in extraordinary circumstances.
:; ''evenodd'' <span style="font-weight:normal;"><code>[swap, even, odd, off]</code></span>
:: If set to <code>swap</code>, then the automatic striping of even and odd rows is reversed. Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows. Setting to <code>even</code> or <code>odd</code> sets all rows to have that striping color. Setting to <code>off</code> disables automatic row striping. This advanced parameter should only be used to fix problems when the navbox is being used as a child of another navbox and the stripes do not match up. Examples and a further description can be found in the section on child navboxes below.
:; ''abovestyle''<nowiki>*</nowiki>
:; ''belowstyle''<nowiki>*</nowiki>
:: CSS styles to apply to the top cell (specified via the ''above'' parameter) and bottom cell (specified via the ''below'' parameter). Typically used to set background color or text alignment:
::: <code>abovestyle = background:#''nnnnnn'';</code>
::: <code>abovestyle = text-align:[''left/center/right''];</code>
:; ''imagestyle''<nowiki>*</nowiki>
:; ''imageleftstyle''<nowiki>*</nowiki>
:: CSS styles to apply to the cells where the image/imageleft sits. These styles should only be used in exceptional circumstances, usually to fix width problems if the width of groups is set and the width of the image cell grows too large. Examples:
::: <code>imagestyle = width:5em;</code>
===== Default styles =====
The style settings listed here are those that editors using the navbox change most often. The other more complex style settings were left out of this list to keep it simple. Most styles are set in {{Blue|MediaWiki:Common.css}}.
:<code>bodystyle = background:#fdfdfd; width:100%; vertical-align:middle;</code>
:<code>titlestyle = background:#ccccff; padding-left:1em; padding-right:1em; text-align:center;</code>
:<code>abovestyle = background:#ddddff; padding-left:1em; padding-right:1em; text-align:center;</code>
:<code>belowstyle = background:#ddddff; padding-left:1em; padding-right:1em; text-align:center;</code>
:<code>groupstyle = background:#ddddff; padding-left:1em; padding-right:1em; text-align:right;</code>
:<code>liststyle = background:transparent; text-align:left/center;</code>
:<code>oddstyle = background:transparent;</code>
:<code>evenstyle = background:#f7f7f7;</code>
Since ''liststyle'' and ''oddstyle'' are transparent odd lists have the color of the ''bodystyle'', which defaults to #fdfdfd (white with a hint of gray). A list has <code>text-align:left;</code> if it has a group, if not it has <code>text-align:center;</code>. Since only ''bodystyle'' has a vertical-align all the others inherit its <code>vertical-align:middle;</code>.
=== Advanced parameters ===
:; ''titlegroup''
:: This puts a group in the title area, with the same default styles as ''group<sub>n</sub>''. It should be used only in exceptional circumstances (usually advanced meta-templates) and its use requires some knowledge of the internal code of {{tl|Navbox}}; you should be ready to manually set up CSS styles to get everything to work properly if you wish to use it. If you think you have an application for this parameter, it might be best to change your mind, or consult the talk page first.
:; ''titlegroupstyle''
:: The styles for the titlegroup cell.
:; ''innerstyle''
:: A very advanced parameter to be used ''only'' for advanced meta-templates employing the navbox. Internally, the navbox uses an outer table to draw the border, and then an inner table for everything else (title/above/groups/lists/below/images, etc.). The ''style''/''bodystyle'' parameter sets the style for the outer table, which the inner table inherits, but in advanced cases (meta-templates) it may be necessary to directly set the style for the inner table. This parameter provides access to that inner table so styles can be applied. Use at your own risk.
====Microformats====
;bodyclass : This parameter is inserted into the "class" attribute for the infobox as a whole.
;titleclass : This parameter is inserted into the "class" attribute for the infobox's title caption.
This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a navbox as containing [[w:hCard|hCard]] information about a person, for example, add the following parameter:
<pre>
|bodyclass = vcard
</pre>
''and''
<pre>
|titleclass = fn
</pre>
''or'' (for example):
<pre><nowiki>
|title = The books of <span class="fn">[[Iain Banks]]</span>
</nowiki></pre>
...and so forth.
== Layout of table ==
Table generated by {{tl|Navbox}} '''without''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only):
{{Navbox
|name = Navbox/doc
|state = uncollapsed
|liststyle = background:silver;
|title = {{{title}}}
|group1 = {{{group1}}}
|list1 = {{{list1}}}
|group2 = {{{group2}}}
|list2 = {{{list2}}}
|list3 = {{{list3}}} ''without {{{group3}}}''
|group4 = {{{group4}}}
|list4 = {{{list4}}}
}}
Table generated by {{tl|Navbox}} '''with''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only):
{{Navbox
|name = Navbox/doc
|state = uncollapsed
|liststyle = background:silver;
|image = {{{image}}}
|title = {{{title}}}
|above = {{{above}}}
|group1 = {{{group1}}}
|list1 = {{{list1}}}
|group2 = {{{group2}}}
|list2 = {{{list2}}}
|list3 = {{{list3}}} ''without {{{group3}}}''
|group4 = {{{group4}}}
|list4 = {{{list4}}}
|below = {{{below}}}
}}
Table generated by {{tl|Navbox}} '''with''' ''image'', ''imageleft'', ''lists'', and '''without''' ''groups'', ''above'', ''below'' (gray list background color added for illustration only):
{{Navbox
|name = Navbox/doc
|state = uncollapsed
|liststyle = background:silver;
|image = {{{image}}}
|imageleft = {{{imageleft}}}
|title = {{{title}}}
|list1 = {{{list1}}}
|list2 = {{{list2}}}
|list3 = {{{list3}}}
|list4 = {{{list4}}}
}}
== Technical details ==
*This template uses CSS classes for most of its looks, thus it is fully skinnable.
*Internally this meta template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta templates since wiki markup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and special characters in parameters.
*For more technical details see the CSS classes in {{Blue|MediaWiki:Common.css}} and the collapsible table used to hide the box in {{Blue|MediaWiki:Common.js}}.
=== Intricacies ===
*The 2px wide border between groups and lists is drawn using the border-left property of the list cell. Thus, if you wish to change the background color of the template (for example <code>bodystyle = background:purple;</code>), then you'll need to make the border-left-color match the background color (i.e. <code>liststyle = border-left-color:purple;</code>). If you wish to have a border around each list cell, then the 2px border between the list cells and group cells will disappear; you'll have to come up with your own solution.
*The list cell width is initially set to 100%. Thus, if you wish to manually set the width of group cells, you'll need to also specify the liststyle to have width:auto. If you wish to set the group width and use images, it's up to you to figure out the CSS in the groupstyle, liststyle, imagestyle, and imageleftstyle parameters to get everything to work correctly. Example of setting group width:
::<code>groupstyle = width:10em;</code>
::<code>liststyle = width:auto;</code>
*Adjacent navboxes have only a 1 pixel border between them (except in IE6, which doesn't support the necessary CSS). If you set the top or bottom margin of <code>style/bodystyle</code>, then this will not work.
*The default margin-left and margin-right of the outer navbox table are set to "auto;". If you wish to use navbox as a float, you need to manually set the margin-left and margin-right values, because the auto margins interfere with the float option. For example, add the following code to use the navbox as a float:
::<code>style = width:22em;float:right;margin-left:1em;margin-right:0em;</code>
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"format": "block",
"description": {
"en": "This template allows a navigational template to be set up relatively quickly by supplying it one or more lists of links.",
"cs": "Tato šablona umožňuje poměrně rychle nastavit navigační šablonu tím, že jí poskytne jeden nebo více seznamů odkazů."
},
"params": {
"image": {
"label": {
"en": "Image",
"cs": "Obraz"
},
"type": "wiki-file-name"
},
"imageleft": {
"label": {
"en": "Image left",
"cs": "Obrázek vlevo"
},
"type": "wiki-file-name"
},
"name": {
"label": {
"en": "Template Name",
"cs": "Název šablony"
},
"description": {
"en": "The name of the template that creates this navbox.",
"cs": "Název šablony, která vytváří toto navigační pole."
},
"autovalue": "{{subst:PAGENAME}}",
"suggested": true,
"type": "wiki-template-name"
},
"title": {
"label": {
"en": "Title",
"cs": "Titul"
},
"type": "string"
},
"above": {
"label": {
"en": "Content above",
"cs": "Obsah výše"
},
"type": "content"
},
"group1": {
"label": {
"en": "Group #1",
"cs": "Skupina 1"
},
"type": "string"
},
"list1": {
"label": {
"en": "List #1",
"cs": "Seznam 1"
},
"type": "content"
},
"group2": {
"label": {
"en": "Group 2",
"cs": "Skupina 2"
},
"type": "string"
},
"list2": {
"label": {
"en": "List #2",
"cs": "Seznam 2"
},
"type": "content"
},
"list3": {
"label": {
"en": "List #3",
"cs": "Seznam 3"
},
"type": "content"
},
"group3": {
"label": {
"en": "Group #3",
"cs": "Skupina 3"
},
"type": "string"
},
"group4": {
"label": {
"en": "Group #4",
"cs": "Skupina 4"
},
"type": "string"
},
"list4": {
"label": {
"en": "List #4",
"cs": "Seznam 4"
},
"type": "content"
},
"group5": {
"label": {
"en": "Group #5",
"cs": "Skupina 5"
},
"type": "string"
},
"list5": {
"label": {
"en": "List #5",
"cs": "Seznam 5"
},
"type": "content"
},
"group6": {
"label": {
"en": "Group #6",
"cs": "Skupina 6"
},
"type": "string"
},
"list6": {
"label": {
"en": "List #6",
"cs": "Seznam 6"
},
"type": "content"
},
"group7": {
"label": {
"en": "Group #7",
"cs": "Skupina 7"
},
"type": "string"
},
"list7": {
"label": {
"en": "List #7",
"cs": "Seznam 7"
},
"type": "content"
},
"group8": {
"label": {
"en": "Group #8",
"cs": "Skupina 8"
},
"type": "string"
},
"list8": {
"label": {
"en": "List #8",
"cs": "Seznam 8"
},
"type": "content"
},
"group9": {
"label": {
"en": "Group #9",
"cs": "Skupina 9"
},
"type": "string"
},
"list9": {
"label": {
"en": "List #9",
"cs": "Seznam 9"
},
"type": "content"
},
"group10": {
"label": {
"en": "Group #10",
"cs": "Skupina 10"
},
"type": "string"
},
"list10": {
"label": {
"en": "List #10",
"cs": "Seznam 10"
},
"type": "content"
},
"group11": {
"label": {
"en": "Group #11",
"cs": "Skupina 11"
},
"type": "string"
},
"list11": {
"label": {
"en": "List #11",
"cs": "Seznam 11"
},
"type": "content"
},
"group12": {
"label": {
"en": "Group #12",
"cs": "Skupina 12"
},
"type": "string"
},
"list12": {
"label": {
"en": "List #12",
"cs": "Seznam 12"
},
"type": "content"
},
"group13": {
"label": {
"en": "Group #13",
"cs": "Skupina 13"
},
"type": "string"
},
"list13": {
"label": {
"en": "List #13",
"cs": "Seznam 13"
},
"type": "content"
},
"group14": {
"label": {
"en": "Group #14",
"cs": "Skupina 14"
},
"type": "string"
},
"list14": {
"label": {
"en": "List #14",
"cs": "Seznam 14"
},
"type": "content"
},
"group15": {
"label": {
"en": "Group #15",
"cs": "Skupina 15"
},
"type": "string"
},
"list15": {
"label": {
"en": "List #15",
"cs": "Seznam 15"
},
"type": "content"
},
"group16": {
"label": {
"en": "Group #16",
"cs": "Skupina 16"
},
"type": "string"
},
"list16": {
"label": {
"en": "List #16",
"cs": "Seznam 16"
},
"type": "content"
},
"group17": {
"label": {
"en": "Group #17",
"cs": "Skupina 17"
},
"type": "string"
},
"list17": {
"label": {
"en": "List #17",
"cs": "Seznam 17"
},
"type": "content"
},
"group18": {
"label": {
"en": "Group #18",
"cs": "Skupina 18"
},
"type": "string"
},
"list18": {
"label": {
"en": "List #18",
"cs": "Seznam 18"
},
"type": "content"
},
"group19": {
"label": {
"en": "Group #19",
"cs": "Skupina 19"
},
"type": "string"
},
"list19": {
"label": {
"en": "List #19",
"cs": "Seznam 19"
},
"type": "content"
},
"group20": {
"label": {
"en": "Group #20",
"cs": "Skupina 20"
},
"type": "string"
},
"list20": {
"label": {
"en": "List #20",
"cs": "Seznam 20"
},
"type": "content"
},
"below": {
"label": {
"en": "Content below",
"cs": "Obsah níže"
},
"type": "content"
}
},
"paramOrder": [
"name",
"title",
"image",
"imageleft",
"above",
"group1",
"list1",
"group2",
"list2",
"group3",
"list3",
"group4",
"list4",
"group5",
"list5",
"group6",
"list6",
"group7",
"list7",
"group8",
"list8",
"group9",
"list9",
"group10",
"list10",
"group11",
"list11",
"group12",
"list12",
"group13",
"list13",
"group14",
"list14",
"group15",
"list15",
"group16",
"list16",
"group17",
"list17",
"group18",
"list18",
"group19",
"list19",
"group20",
"list20",
"below"
]
}
</templatedata>
<includeonly>{{Sandbox other||
<!--Categories-->
[[Category:Formatting templates| ]]
<!--Other languages-->
}}</includeonly>
8142de78771267fe9dbd05b8df296fa561200adf
Template:))
10
36
69
2022-12-18T08:36:48Z
mediawikiwiki>Rebulka
0
překlad a editace
wikitext
text/x-wiki
}}<noinclude>
{{documentation}}[[Category:Workaround templates]]
</noinclude>
e2331ab1b2f6b7061b29f929a502a016b6d54a54
Template:Sandbox other
10
47
91
2023-01-22T23:53:41Z
mediawikiwiki>Tacsipacsi
0
Undo revision 5731780 by [[Special:Contributions/2001:D08:1810:6E83:1:2:5E36:2856|2001:D08:1810:6E83:1:2:5E36:2856]] ([[User talk:2001:D08:1810:6E83:1:2:5E36:2856|talk]]): test edit
wikitext
text/x-wiki
<onlyinclude>{{#switch:{{SUBPAGENAME}}|sandbox|doc={{{1|}}}|#default={{{2|}}}}}</onlyinclude>
{{documentation}}
44919af6b57ac865d8ec53eabfcb2cb9de35f157
Module:TNT
828
26
49
2023-02-02T01:14:59Z
mediawikiwiki>ExE Boss
0
Only use the `zzz123` workaround for integer‑only parameter names
Scribunto
text/plain
--
-- INTRO: (!!! DO NOT RENAME THIS PAGE !!!)
-- This module allows any template or module to be copy/pasted between
-- wikis without any translation changes. All translation text is stored
-- in the global Data:*.tab pages on Commons, and used everywhere.
--
-- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules
--
-- ATTENTION:
-- Please do NOT rename this module - it has to be identical on all wikis.
-- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT
-- Please do not modify it anywhere else, as it may get copied and override your changes.
-- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT
--
-- DESCRIPTION:
-- The "msg" function uses a Commons dataset to translate a message
-- with a given key (e.g. source-table), plus optional arguments
-- to the wiki markup in the current content language.
-- Use lang=xx to set language. Example:
--
-- {{#invoke:TNT | msg
-- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab -->
-- | source-table <!-- uses a translation message with id = "source-table" -->
-- | param1 }} <!-- optional parameter -->
--
--
-- The "doc" function will generate the <templatedata> parameter documentation for templates.
-- This way all template parameters can be stored and localized in a single Commons dataset.
-- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons.
--
-- {{#invoke:TNT | doc | Graph:Lines }}
-- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab
-- if the current page is Template:Graph:Lines/doc
--
local p = {}
local i18nDataset = 'I18n/Module:TNT.tab'
-- Forward declaration of the local functions
local sanitizeDataset, loadData, link, formatMessage
function p.msg(frame)
local dataset, id
local params = {}
local lang = nil
for k, v in pairs(frame.args) do
if k == 1 then
dataset = mw.text.trim(v)
elseif k == 2 then
id = mw.text.trim(v)
elseif type(k) == 'number' then
params[k - 2] = mw.text.trim(v)
elseif k == 'lang' and v ~= '_' then
lang = mw.text.trim(v)
end
end
return formatMessage(dataset, id, params, lang)
end
-- Identical to p.msg() above, but used from other lua modules
-- Parameters: name of dataset, message key, optional arguments
-- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset')
function p.format(dataset, key, ...)
local checkType = require('libraryUtil').checkType
checkType('format', 1, dataset, 'string')
checkType('format', 2, key, 'string')
return formatMessage(dataset, key, {...})
end
-- Identical to p.msg() above, but used from other lua modules with the language param
-- Parameters: language code, name of dataset, message key, optional arguments
-- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset')
function p.formatInLanguage(lang, dataset, key, ...)
local checkType = require('libraryUtil').checkType
checkType('formatInLanguage', 1, lang, 'string')
checkType('formatInLanguage', 2, dataset, 'string')
checkType('formatInLanguage', 3, key, 'string')
return formatMessage(dataset, key, {...}, lang)
end
-- Obsolete function that adds a 'c:' prefix to the first param.
-- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab'
function p.link(frame)
return link(frame.args[1])
end
function p.doc(frame)
local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1])
return frame:extensionTag('templatedata', p.getTemplateData(dataset)) ..
formatMessage(i18nDataset, 'edit_doc', {link(dataset)})
end
function p.getTemplateData(dataset)
-- TODO: add '_' parameter once lua starts reindexing properly for "all" languages
local data = loadData(dataset)
local names = {}
for _, field in ipairs(data.schema.fields) do
table.insert(names, field.name)
end
local numOnly = true
local params = {}
local paramOrder = {}
for _, row in ipairs(data.data) do
local newVal = {}
local name = nil
for pos, columnName in ipairs(names) do
if columnName == 'name' then
name = row[pos]
else
newVal[columnName] = row[pos]
end
end
if name then
if (
(type(name) ~= "number")
and (
(type(name) ~= "string")
or not string.match(name, "^%d+$")
)
) then
numOnly = false
end
params[name] = newVal
table.insert(paramOrder, name)
end
end
-- Work around json encoding treating {"1":{...}} as an [{...}]
if numOnly then
params['zzz123']=''
end
local json = mw.text.jsonEncode({
params=params,
paramOrder=paramOrder,
description=data.description,
})
if numOnly then
json = string.gsub(json,'"zzz123":"",?', "")
end
return json
end
-- Local functions
sanitizeDataset = function(dataset)
if not dataset then
return nil
end
dataset = mw.text.trim(dataset)
if dataset == '' then
return nil
elseif string.sub(dataset,-4) ~= '.tab' then
return dataset .. '.tab'
else
return dataset
end
end
loadData = function(dataset, lang)
dataset = sanitizeDataset(dataset)
if not dataset then
error(formatMessage(i18nDataset, 'error_no_dataset', {}))
end
-- Give helpful error to thirdparties who try and copy this module.
if not mw.ext or not mw.ext.data or not mw.ext.data.get then
error(string.format([['''Missing JsonConfig extension, or not properly configured;
Cannot load https://commons.wikimedia.org/wiki/Data:%s.
See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates''']], dataset))
end
local data = mw.ext.data.get(dataset, lang)
if data == false then
if dataset == i18nDataset then
-- Prevent cyclical calls
error('Missing Commons dataset ' .. i18nDataset)
else
error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)}))
end
end
return data
end
-- Given a dataset name, convert it to a title with the 'commons:data:' prefix
link = function(dataset)
return 'c:Data:' .. mw.text.trim(dataset or '')
end
formatMessage = function(dataset, key, params, lang)
for _, row in pairs(loadData(dataset, lang).data) do
local id, msg = unpack(row)
if id == key then
local result = mw.message.newRawMessage(msg, unpack(params or {}))
return result:plain()
end
end
if dataset == i18nDataset then
-- Prevent cyclical calls
error('Invalid message key "' .. key .. '"')
else
error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)}))
end
end
return p
e8ec673cd9d57a37a2bc326979c7980f1657fc3a
Module:Documentation
828
12
21
2023-02-14T16:27:01Z
Uzume
6
cherry pick Module wikitext support from [[w:en:Module:Documentation]]
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
local messageBox = require('Module:Message box')
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local i18n = mw.loadData('Module:Documentation/i18n')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-type', cfgKey, expectType, type(msg)), 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-empty', '$' .. match, cfgKey), 4)
end
local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
return ret
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
return '<small style="font-style: normal;">(' .. table.concat(ret, ' | ') .. ')</small>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Load TemplateStyles
----------------------------------------------------------------------------
p.main = function(frame)
local parent = frame.getParent(frame)
local output = p._main(parent.args)
return frame:extensionTag{ name='templatestyles', args = { src= message('templatestyles-scr') } } .. output
end
----------------------------------------------------------------------------
-- Main function
----------------------------------------------------------------------------
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--
-- Messages:
-- 'main-div-id' --> 'template-documentation'
-- 'main-div-classes' --> 'template-documentation iezoomfix'
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
-- This div tag is from {{documentation/start box}}, but moving it here
-- so that we don't have to worry about unclosed tags.
:tag('div')
:attr('id', message('main-div-id'))
:addClass(message('main-div-class'))
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:done()
:wikitext(p._endBox(args, env))
:wikitext(p.addTrackingCategories(env))
return tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title objects and other namespace- or
-- path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
-- env.printTitle - the print version of the template, located at the /Print subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.printTitle()
--[[
-- Title object for the /Print subpage.
-- Messages:
-- 'print-subpage' --> 'Print'
--]]
return env.templateTitle:subPageTitle(message('print-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the same as the
-- subject namespace. However, pages in the Article, File, MediaWiki or Category
-- namespaces must have their /doc, /sandbox and /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
local moduleWikitext = package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[w:Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --> '[[w:Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
-- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local frame = mw.getCurrentFrame()
local isPreviewing = frame:preprocess('{{REVISIONID}}') == '' -- True if the page is being previewed.
local pagetype
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
else
pagetype = message('sandbox-notice-pagetype-other')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if isPreviewing or not compareUrl then
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
else
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.contentModel == "Scribunto" then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
text = text .. makeCategoryLink(message('sandbox-category'))
omargs.text = text
omargs.class = message('sandbox-class')
local ret = '<div style="clear: both;"></div>'
ret = ret .. messageBox.main('ombox', omargs)
return ret
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local title = env.title
local protectionLevels
local protectionTemplate = message('protection-template')
local namespace = title.namespace
if not (protectionTemplate and (namespace == 10 or namespace == 828)) then
-- Don't display the protection template if we are not in the template or module namespaces.
return nil
end
protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editLevels = protectionLevels.edit
local moveLevels = protectionLevels.move
if moveLevels and moveLevels[1] == 'sysop' or editLevels and editLevels[1] then
-- The page is full-move protected, or full, template, or semi-protected.
local frame = mw.getCurrentFrame()
return frame:expandTemplate{title = protectionTemplate, args = message('protection-template-args', nil, 'table')}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = i18n['view-link-display']
data.editLinkDisplay = i18n['edit-link-display']
data.historyLinkDisplay = i18n['history-link-display']
data.purgeLinkDisplay = i18n['purge-link-display']
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 6 then -- File namespace
preload = message('file-docpage-preload')
elseif subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = i18n['create-link-display']
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=Documentation icon]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'start-box-linkclasses' --> 'mw-editsection-like plainlinks'
-- 'start-box-link-id' --> 'doc_editlinks'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = i18n['template-namespace-heading']
elseif subjectSpace == 828 then -- Module namespace
data.heading = i18n['module-namespace-heading']
elseif subjectSpace == 6 then -- File namespace
data.heading = i18n['file-namespace-heading']
else
data.heading = i18n['other-namespaces-heading']
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
data.linksClass = message('start-box-linkclasses')
data.linksId = message('start-box-link-id')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
:addClass(message('header-div-class'))
:tag('div')
:addClass(message('heading-div-class'))
:wikitext(data.heading)
local links = data.links
if links then
sbox
:tag('div')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
local cbox = mw.html.create('div')
cbox
:addClass(message('content-div-class'))
:wikitext('\n' .. (content or '') .. '\n')
return tostring(cbox)
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the footer text field.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '')
text = text .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates.
if printBlurb then
text = text .. '<br />' .. printBlurb
end
end
end
local ebox = mw.html.create('div')
ebox
:addClass(message('footer-div-class'))
:wikitext(text)
return tostring(ebox)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[w:Wikipedia:Template documentation|documentation]]
-- is [[w:Wikipedia:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[w:Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle or args.content then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = i18n['edit-link-display']
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = i18n['history-link-display']
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = i18n['create-link-display']
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
function p.makePrintBlurb(args, env)
--[=[
-- Generates the blurb displayed when there is a print version of the template available.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'print-link-display' --> '/Print'
-- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]'
-- .. ' of this template exists at $1.'
-- .. ' If you make a change to this template, please update the print version as well.'
-- 'display-print-category' --> true
-- 'print-category' --> 'Templates with print versions'
--]=]
local printTitle = env.printTitle
if not printTitle then
return nil
end
local ret
if printTitle.exists then
local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display'))
ret = message('print-blurb', {printLink})
local displayPrintCategory = message('display-print-category', nil, 'boolean')
if displayPrintCategory then
ret = ret .. makeCategoryLink(message('print-category'))
end
end
return ret
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
0e23eec0d3c20c23afcd28849e240b9083dbcf88
Module:Documentation/config
828
13
23
2023-03-11T18:43:06Z
Pppery
7
Disable a silly category
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local _format = require('Module:TNT').format
local function format(id)
return _format('I18n/Documentation', id)
end
local cfg = {} -- Do not edit this line.
cfg['templatestyles-scr'] = 'Module:Documentation/styles.css'
----------------------------------------------------------------------------------------------------
-- Protection template configuration
----------------------------------------------------------------------------------------------------
-- cfg['protection-template']
-- The name of the template that displays the protection icon (a padlock on enwiki).
cfg['protection-template'] = 'pp-template'
-- cfg['protection-reason-edit']
-- The protection reason for edit-protected templates to pass to
-- [[Module:Protection banner]].
cfg['protection-reason-edit'] = 'template'
--[[
-- cfg['protection-template-args']
-- Any arguments to send to the protection template. This should be a Lua table.
-- For example, if the protection template is "pp-template", and the wikitext template invocation
-- looks like "{{pp-template|docusage=yes}}", then this table should look like "{docusage = 'yes'}".
--]]
cfg['protection-template-args'] = {docusage = 'yes'}
--[[
----------------------------------------------------------------------------------------------------
-- Sandbox notice configuration
--
-- On sandbox pages the module can display a template notifying users that the current page is a
-- sandbox, and the location of test cases pages, etc. The module decides whether the page is a
-- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the
-- messages that the notices contains.
----------------------------------------------------------------------------------------------------
--]]
-- cfg['sandbox-notice-image']
-- The image displayed in the sandbox notice.
cfg['sandbox-notice-image'] = '[[Image:Edit In Sandbox Icon - Color.svg|40px|alt=|link=]]'
--[[
-- cfg['sandbox-notice-pagetype-template']
-- cfg['sandbox-notice-pagetype-module']
-- cfg['sandbox-notice-pagetype-other']
-- The page type of the sandbox page. The message that is displayed depends on the current subject
-- namespace. This message is used in either cfg['sandbox-notice-blurb'] or
-- cfg['sandbox-notice-diff-blurb'].
--]]
cfg['sandbox-notice-pagetype-template'] = format('sandbox-notice-pagetype-template')
cfg['sandbox-notice-pagetype-module'] = format('sandbox-notice-pagetype-module')
cfg['sandbox-notice-pagetype-other'] = format('sandbox-notice-pagetype-other')
--[[
-- cfg['sandbox-notice-blurb']
-- cfg['sandbox-notice-diff-blurb']
-- cfg['sandbox-notice-diff-display']
-- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence
-- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page
-- type, which is either cfg['sandbox-notice-pagetype-template'],
-- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what
-- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between
-- the sandbox and the main template. The display value of the diff link is set by
-- cfg['sandbox-notice-compare-link-display'].
--]]
cfg['sandbox-notice-blurb'] = format('sandbox-notice-blurb')
cfg['sandbox-notice-diff-blurb'] = format('sandbox-notice-diff-blurb')
cfg['sandbox-notice-compare-link-display'] = format('sandbox-notice-compare-link-display')
--[[
-- cfg['sandbox-notice-testcases-blurb']
-- cfg['sandbox-notice-testcases-link-display']
-- cfg['sandbox-notice-testcases-run-blurb']
-- cfg['sandbox-notice-testcases-run-link-display']
-- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit. $1 is a link to the test cases page.
-- cfg['sandbox-notice-testcases-link-display'] is the display value for that link.
-- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test
-- cases page, and $2 is a link to the page to run it.
-- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test
-- cases.
--]]
cfg['sandbox-notice-testcases-blurb'] = format('sandbox-notice-testcases-blurb')
cfg['sandbox-notice-testcases-link-display'] = format('sandbox-notice-testcases-link-display')
cfg['sandbox-notice-testcases-run-blurb'] = format('sandbox-notice-testcases-run-blurb')
cfg['sandbox-notice-testcases-run-link-display'] = format('sandbox-notice-testcases-run-link-display')
-- cfg['sandbox-category']
-- A category to add to all template sandboxes.
cfg['sandbox-category'] = 'Template sandboxes'
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=Documentation icon]]'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = format('transcluded-from-blurb')
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = format('create-module-doc-blurb')
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = format('experiment-blurb-template')
cfg['experiment-blurb-module'] = format('experiment-blurb-module')
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = format('sandbox-link-display')
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = format('sandbox-edit-link-display')
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = format('sandbox-create-link-display')
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = format('compare-link-display')
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = format('mirror-link-display')
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = format('testcases-link-display')
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = format('testcases-edit-link-display')
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = format('testcases-create-link-display')
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = format('add-categories-blurb')
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = format('subpages-blurb')
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = format('subpages-link-display')
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = format('template-pagetype')
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = format('module-pagetype')
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = format('default-pagetype')
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['file-docpage-preload']
-- Preload file for documentation page in the file namespace.
cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- Print version configuration
----------------------------------------------------------------------------------------------------
-- cfg['print-subpage']
-- The name of the template subpage used for print versions.
cfg['print-subpage'] = 'Print'
-- cfg['print-link-display']
-- The text to display when linking to the /Print subpage.
cfg['print-link-display'] = '/Print'
-- cfg['print-blurb']
-- Text to display if a /Print subpage exists. $1 is a link to the subpage with a display value of cfg['print-link-display'].
cfg['print-blurb'] = format('print-blurb')
-- cfg['display-print-category']
-- Set to true to enable output of cfg['print-category'] if a /Print subpage exists.
-- This should be a boolean value (either true or false).
cfg['display-print-category'] = true
-- cfg['print-category']
-- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists.
cfg['print-category'] = 'Templates with print versions'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['main-div-id']
-- The "id" attribute of the main HTML "div" tag.
cfg['main-div-id'] = 'template-documentation'
-- cfg['main-div-classes']
-- The CSS classes added to the main HTML "div" tag.
cfg['main-div-class'] = 'ts-doc-doc'
cfg['header-div-class'] = 'ts-doc-header'
cfg['heading-div-class'] = 'ts-doc-heading'
cfg['content-div-class'] = 'ts-doc-content'
cfg['footer-div-class'] = 'ts-doc-footer plainlinks'
cfg['sandbox-class'] = 'ts-doc-sandbox'
-- cfg['start-box-linkclasses']
-- The CSS classes used for the [view][edit][history] or [create] links in the start box.
cfg['start-box-linkclasses'] = 'ts-tlinks-tlinks mw-editsection-like plainlinks'
-- cfg['start-box-link-id']
-- The HTML "id" attribute for the links in the start box.
cfg['start-box-link-id'] = 'doc_editlinks'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = false
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
224f3664a83268936f1b9935eafc0055a97071ac
Template:Blue
10
38
73
2023-05-30T14:40:35Z
mediawikiwiki>Hoo man
0
Reverted edits by [[Special:Contribs/2001:16A2:C15E:4BB2:8559:30FB:A2BE:4CD2|2001:16A2:C15E:4BB2:8559:30FB:A2BE:4CD2]] ([[User talk:2001:16A2:C15E:4BB2:8559:30FB:A2BE:4CD2|talk]]) to last version by कन्हाई प्रसाद चौरसिया
wikitext
text/x-wiki
<span style="color:#0645AD;">{{{1}}}</span><noinclude>{{documentation}}
[[Category:Formatting templates{{#translation:}}|{{PAGENAME}}]]
</noinclude>
636ccfaac2c8947c9d036c2a6ac80aeb94f89713
Template:Pp-template
10
33
63
2023-07-01T13:40:33Z
Clump
9
Protected "[[Template:Pp-template]]": Counter-productive edit warring ([Edit=Allow only autoconfirmed users] (expires 13:40, 1 August 2023 (UTC)) [Move=Allow only autoconfirmed users] (expires 13:40, 1 August 2023 (UTC)))
wikitext
text/x-wiki
<includeonly>{{#switch:{{#invoke:Effective protection level|edit|{{FULLPAGENAME}}}}
|*=[[Category:Pages with incorrect protection templates]]
|autoconfirmed={{#tag:indicator|[[File:Semi-protection-shackle-no-text.svg|20px|link=Project:Protected page|alt=Permanently protected {{module other|module|template}}|This high-risk {{module other|module|template}} is permanently semi-protected to prevent vandalism]]|name="pp-default"}}[[Category:{{module other|Modules subject to page protection|Semi-protected templates}}|{{PAGENAME}}]]
|sysop={{#tag:indicator|[[File:Full-protection-shackle-no-text.svg|20px|link=Project:Protected page|alt=Permanently protected {{module other|module|template}}|This high-risk {{module other|module|template}} is permanently protected to prevent vandalism]]|name="pp-default"}}[[Category:{{module other|Modules subject to page protection|Fully protected templates}}|{{PAGENAME}}]]
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
1046e139e5a0380698fd75d7207e9ef53a4ff91d
Module:Template translation
828
53
103
2023-07-07T03:55:34Z
mediawikiwiki>Billinghurst
0
1 revision imported from [[:meta:Module:Template_translation]]
Scribunto
text/plain
local this = {}
function this.checkLanguage(subpage, default)
--[[Check first if there's an any invalid character that would cause the
mw.language.isKnownLanguageTag function() to throw an exception:
- all ASCII controls in [\000-\031\127],
- double quote ("), sharp sign (#), ampersand (&), apostrophe ('),
- slash (/), colon (:), semicolon (;), lower than (<), greater than (>),
- brackets and braces ([, ], {, }), pipe (|), backslash (\\)
All other characters are accepted, including space and all non-ASCII
characters (including \192, which is invalid in UTF-8).
--]]
if mw.language.isValidCode(subpage) and mw.language.isKnownLanguageTag(subpage)
--[[However "SupportedLanguages" are too restrictive, as they discard many
valid BCP47 script variants (only because MediaWiki still does not
define automatic transliterators for them, e.g. "en-dsrt" or
"fr-brai" for French transliteration in Braille), and country variants,
(useful in localized data, even if they are no longer used for
translations, such as zh-cn, also useful for legacy codes).
We want to avoid matching subpagenames containing any uppercase letter,
(even if they are considered valid in BCP 47, in which they are
case-insensitive; they are not "SupportedLanguages" for MediaWiki, so
they are not "KnownLanguageTags" for MediaWiki).
To be more restrictive, we exclude tags
* for specific uses in template subpages and unusable as language tags;
* that is not ASCII and not a lowercase letter, minus-hyphen, or digit,
or does not start by a letter or does not finish by a letter or digit;
* or that has subtags with more than 8 characters between hyphens;
* or that has two hyphens.
--]]
or subpage ~= "doc"
and subpage ~= "layout"
and subpage ~= "button"
and subpage ~= "buttons"
and subpage ~= "sandbox"
and subpage ~= "testcase"
and subpage ~= "testcases"
and string.find(subpage, "^[%l][%-%d%l]*[%d%l]$") ~= nil
and string.find(subpage, "[%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l]") == nil
and string.find(subpage, "%-%-") == nil then
return subpage
end
-- Otherwise there's currently no known language subpage
return default
end
--[[Get the last subpage of an arbitrary page if it is a translation.
To be used from templates.
]]
function this.getLanguageSubpage(frame)
local title = frame and frame.args[1]
if not title or title == '' then
title = mw.title.getCurrentTitle()
end
return this._getLanguageSubpage(title)
end
--[[Get the last subpage of an arbitrary page if it is a translation.
To be used from Lua.
]]
function this._getLanguageSubpage(title)
if type(title) == 'string' then
title = mw.title.new(title)
end
if not title then
-- invalid title
return nil
end
--[[This code does not work in all namespaces where the Translate tool works.
-- It works in the main namespace on Meta because it allows subpages there
-- It would not work in the main namespace of English Wikipedia (but the
-- articles are monolignual on that wiki).
-- On Meta-Wiki the main space uses subpages and its pages are translated.
-- The Translate tool allows translatng pages in all namespaces, even if
-- the namespace officially does not have subpages.
-- On Meta-Wiki the Category namespace still does not have subpages enabled,
-- even if they would be very useful for categorizing templates, that DO have
-- subpages (for documentatio and tstboxes pages). This is a misconfiguration
-- bug of Meta-Wiki. The work-around is to split the full title and then
-- get the last titlepart.
local subpage = title.subpageText
--]]
local titleparts = mw.text.split(title.fullText, '/')
local subpage = titleparts[#titleparts]
return this.checkLanguage(subpage, '')
end
--[[Get the last subpage of the current page if it is a translation.
]]
function this.getCurrentLanguageSubpage()
return this._getLanguageSubpage(mw.title.getCurrentTitle())
end
--[[Get the first part of the language code of the subpage, before the '-'.
--]]
function this.getMainLanguageSubpage()
parts = mw.text.split(this.getCurrentLanguageSubpage(), '-')
return parts[1]
end
--[[Get the last subpage of the current frame if it is a translation.
Not used locally.
--]]
function this.getFrameLanguageSubpage(frame)
return this._getLanguageSubpage(frame:getParent():getTitle())
end
--[[Get the language of the current page. Not used locally.
--]]
function this.getLanguage()
local subpage = mw.title.getCurrentTitle().subpageText
return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode())
end
--[[Get the language of the current frame. Not used locally.
--]]
function this.getFrameLanguage(frame)
local titleparts = mw.text.split(frame:getParent():getTitle(), '/')
local subpage = titleparts[#titleparts]
return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode())
end
function this.title(namespace, basepagename, subpage)
local message, title
local pagename = basepagename
if (subpage or '') ~= '' then
pagename = pagename .. '/' .. subpage
end
local valid, title = xpcall(function()
return mw.title.new(pagename, namespace) -- costly
end, function(msg) -- catch undocumented exception (!?)
-- thrown when namespace does not exist. The doc still
-- says it should return a title, even in that case...
message = msg
end)
if valid and title ~= nil and (title.id or 0) ~= 0 then
return title
end
return { -- "pseudo" mw.title object with id = nil in case of error
prefixedText = pagename, -- the only property we need below
message = message -- only for debugging
}
end
--[[If on a translation subpage (like Foobar/de), this function returns
a given template in the same language, if the translation is available.
Otherwise, the template is returned in its default language, without
modification.
This is aimed at replacing the current implementation of Template:TNTN.
This version does not expand the returned template name: this solves the
problem of self-recursion in TNT when translatable templates need themselves
to transclude other translable templates (such as Tnavbar).
--]]
function this.getTranslatedTemplate(frame, withStatus)
local args = frame.args
local pagename = args['template']
--[[Check whether the pagename is actually in the Template namespace, or
if we're transcluding a main-namespace page.
(added for backward compatibility of Template:TNT)
]]
local namespace, title = args['tntns'] or ''
if namespace ~= '' then -- Checks for tntns parameter for custom ns.
title = this.title(namespace, pagename) -- Costly
else -- Supposes that set page is in ns10.
namespace = 'Template'
title = this.title(namespace, pagename) -- Costly
if title.id == nil then -- not found in the Template namespace, assume the main namespace (for backward compatibility)
namespace = ''
title = this.title(namespace, pagename) -- Costly
end
end
-- Get the last subpage and check if it matches a known language code.
local subpage = args['uselang'] or ''
if subpage == '' then
subpage = this.getCurrentLanguageSubpage()
end
if subpage == '' then
-- Check if a translation of the pagename exists in English
local newtitle = this.title(namespace, pagename, 'en') -- Costly
-- Use the translation when it exists
if newtitle.id ~= nil then
title = newtitle
end
else
-- Check if a translation of the pagename exists in that language
local newtitle = this.title(namespace, pagename, subpage) -- Costly
if newtitle.id == nil then
-- Check if a translation of the pagename exists in English
newtitle = this.title(namespace, pagename, 'en') -- Costly
end
-- Use the translation when it exists
if newtitle.id ~= nil then
title = newtitle
end
end
-- At this point the title should exist
if withStatus then
-- status returned to Lua function below
return title.prefixedText, title.id ~= nil
else
-- returned directly to MediaWiki
return title.prefixedText
end
end
--[[If on a translation subpage (like Foobar/de), this function renders
a given template in the same language, if the translation is available.
Otherwise, the template is rendered in its default language, without
modification.
This is aimed at replacing the current implementation of Template:TNT.
Note that translatable templates cannot transclude themselves other
translatable templates, as it will recurse on TNT. Use TNTN instead
to return only the effective template name to expand externally, with
template parameters also provided externally.
--]]
function this.renderTranslatedTemplate(frame)
local title, found = this.getTranslatedTemplate(frame, true)
-- At this point the title should exist prior to performing the expansion
-- of the template, otherwise render a red link to the missing page
-- (resolved in its assumed namespace). If we don't tet this here, a
-- script error would be thrown. Returning a red link is consistant with
-- MediaWiki behavior when attempting to transclude inexistant templates.
if not found then
return '[[' .. title .. ']]'
end
-- Copy args pseudo-table to a proper table so we can feed it to expandTemplate.
-- Then render the pagename.
local args = frame.args
local pargs = (frame:getParent() or {}).args
local arguments = {}
if (args['noshift'] or '') == '' then
for k, v in pairs(pargs) do
local n = tonumber(k) or 0
if n <= 0 then -- unnumbered args
arguments[k] = v
elseif n >= 2 then -- numbered args >= 2 need to be shifted
arguments[n - 1] = v
end
end
else -- special case where TNT is used as autotranslate
-- (don't shift again what is shifted in the invokation)
for k, v in pairs(pargs) do
arguments[k] = v
end
end
arguments['template'] = title -- override the existing parameter of the base template name supplied with the full name of the actual template expanded
arguments['tntns'] = nil -- discard the specified namespace override
arguments['uselang'] = args['uselang'] -- argument forwarded into parent frame
arguments['noshift'] = args['noshift'] -- argument forwarded into parent frame
return frame:expandTemplate{title = ':' .. title, args = arguments}
end
--[[A helper for mocking TNT in Special:TemplateSandbox. TNT breaks
TemplateSandbox; mocking it with this method means templates won't be
localized but at least TemplateSandbox substitutions will work properly.
Won't work with complex uses.
--]]
function this.mockTNT(frame)
local pargs = (frame:getParent() or {}).args
local arguments = {}
for k, v in pairs(pargs) do
local n = tonumber(k) or 0
if n <= 0 then -- unnumbered args
arguments[k] = v
elseif n >= 2 then -- numbered args >= 2 need to be shifted
arguments[n - 1] = v
end
end
if not pargs[1] then
return ''
end
return frame:expandTemplate{title = 'Template:' .. pargs[1], args = arguments}
end
return this
5d6ccce18a15ce0078fd1918b6afeb5b443f37ee
Template:High-risk
10
42
81
2023-08-19T01:30:30Z
mediawikiwiki>Shirayuki
0
Marked this version for translation
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude>{{#switch:<translate></translate>
| =
{{ombox
| type = content
| image = [[File:OOjs UI icon alert-warning.svg|40px|alt=]]
| imageright =
| text = {{#switch:{{NAMESPACE}}
|Module={{#if:{{{1|}}}
|'''<translate><!--T:3--> This Lua module is used on approximately <tvar name=5>{{formatnum:{{{1}}}}}</tvar> pages.</translate>'''
|'''<translate><!--T:9--> This Lua module is used on many pages.</translate>'''
}}<!--/#if-->
|#default={{#if:{{{1|}}}
|'''<translate><!--T:10--> This template is used on approximately <tvar name=5>{{formatnum:{{{1}}}}}</tvar> pages.</translate>'''
|'''<translate><!--T:11--> This template is used on many pages.</translate>'''
}}<!--/#if-->
}}<!--/#switch--><br />
{{#switch:{{NAMESPACE}}
|Module=<translate><!--T:2--> To avoid large-scale disruption and unnecessary server load, any changes to this module should first be tested in its [[<tvar name=4>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/sandbox</tvar>|/sandbox]] or [[<tvar name=5>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/testcases</tvar>|/testcases]] subpages.</translate>
|#default=<translate><!--T:12--> To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in its [[<tvar name=4>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/sandbox</tvar>|/sandbox]] or [[<tvar name=5>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/testcases</tvar>|/testcases]] subpages or in your own [[<tvar name=9>Special:MyLanguage/Help:Subpages#Use of subpages</tvar>|user subpage]].</translate>
}}<!--/#switch-->
<translate><!--T:1--> The tested changes can then be added to this page in one single edit.</translate>
{{#if:{{{2|}}}
|<translate><!--T:4--> Please consider discussing any changes at <tvar name=2>[[{{trim|{{{2}}}}}]]</tvar> before implementing them.</translate>
|<translate><!--T:13--> Please consider discussing any changes on the [[<tvar name=3>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{TALKSPACE}}:{{BASEPAGENAME}}|#default={{TALKPAGENAME}}}}</tvar>|talk page]] before implementing them.</translate>
}}<!--/#if-->
}}<!--/ombox-->
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:High-risk|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{Documentation|content=
<translate><!--T:14--> This is the <tvar name="1">{{tl|high-risk}}</tvar> message box.</translate> <translate><!--T:15--> It is meant to be put at the top of the documentation page on the most high-use (high-risk) templates and Lua modules (the template detects the name space), i.e., for templates used on a large number of pages</translate>
{{note|1=<translate><!--T:16--> It is normal that some of the links in the message box are red.</translate>}}
<translate>
=== Usage === <!--T:5-->
</translate>
<translate><!--T:17--> The template can be used as is.</translate>
<translate><!--T:18--> But it can also take some parameters:</translate>
* <translate><!--T:19--> First parameter is the number of pages.</translate>
* <translate><!--T:20--> Second parameter is the name of some other talk page if you want discussion to be made there instead.</translate> <translate><!--T:21--> But a better option might be to redirect the talkpage of your template to that other talkpage.</translate>
<translate>
===Examples=== <!--T:6-->
</translate>
<pre>
{{high-risk| 30,000+ | Project:Village Pump}}
</pre>
{{high-risk| 30,000+ | Project:Village Pump}}
<pre>
{{high-risk| 30,000+ }}
</pre>
{{high-risk| 30,000+ }}
<pre>
{{high-risk| | Project:Village Pump}}
</pre>
{{high-risk| | Project:Village Pump}}
<translate><!--T:22--> The full code for a /doc page top may look like this:</translate>
<pre>
{{documentation subpage}}
<!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). -->
{{high-risk| 30,000+ }}
</pre>
<translate>
=== Technical details === <!--T:7-->
</translate>
<translate><!--T:23--> The <tvar name="1">[[{{translatable}}/sandbox|/sandbox]]</tvar> and <tvar name="2">[[{{translatable}}/testcases|/testcases]]</tvar> links are the standard names for such subpages.</translate>
<translate><!--T:24--> If those pages are created then the green /doc box for the template will detect them and link to them in its heading.</translate>
<translate><!--T:25--> For instance see the top of this documentation.</translate>
<translate>
=== See also === <!--T:8-->
</translate>
* {{tl|intricate template}} – <translate><!--T:26--> For the intricate, i.e., complex templates.</translate>
* {{tl|pp-template}} – <translate><!--T:27--> The protection template that usually is put on high-risk templates.</translate>
* {{tl|used in system}} – <translate><!--T:28--> For templates used in the user interface.</translate>
}}
</noinclude>
39984a0ba1e5d3c80a91adfd865e7acbf0112340
Template:Documentation
10
29
55
2023-08-20T02:47:59Z
Shirayuki
11
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude><includeonly>{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}</includeonly><noinclude>
{{documentation|content=
{{Lua|Module:Documentation}}
<translate><!--T:12--> This template automatically displays a documentation box like the one you are seeing now, of which the content is sometimes transcluded from another page.</translate>
<translate><!--T:13--> It is intended for pages which are [[<tvar name=1>Special:MyLanguage/Help:Transclusion</tvar>|transcluded]] in other pages, i.e. templates, whether in the template namespace or not.</translate>
<translate>
==Usage== <!--T:2-->
===Customising display=== <!--T:3-->
<!--T:4-->
Overrides exist to customise the output in special cases:
</translate>
* <nowiki>{{</nowiki>documentation{{!}}'''heading'''=<nowiki>}}</nowiki> - <translate><!--T:5--> change the text of the "documentation" heading.</translate> <translate><!--T:10--> If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.</translate>
<translate>
==Rationale== <!--T:6-->
</translate>
<translate><!--T:7--> This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation and categories.</translate>
<translate><!--T:8--> It also reduces server resources by circumventing a [[w:Wikipedia:Template limits|technical limitation of templates]] (see a [[<tvar name=1>:en:Special:Diff/69888944</tvar>|developer's explanation]]).</translate>
<translate>
==See also== <!--T:9-->
</translate>
* <translate><!--T:14--> [[w:Template:Documentation subpage]]</translate>
* {{tim|Documentation}}
* <translate><!--T:11--> [[w:Wikipedia:Template documentation]]</translate>
}}
[[Category:Formatting templates{{#translation:}}|Template documentation]]
[[Category:Template documentation{{#translation:}}| ]]
</noinclude><includeonly>{{#if:{{{content|}}}|
[[Category:Template documentation pages{{#translation:}}]]
}}</includeonly>
c1ef6cbf9cb4c65ddd087c09aa6affb00dc5bfad
Module:Effective protection level
828
16
29
2023-08-25T18:27:30Z
Clump
9
Reverted edits by [[Special:Contribs/2600:1010:B06E:8ABA:3C2F:311A:6FCA:8A5|2600:1010:B06E:8ABA:3C2F:311A:6FCA:8A5]] ([[User talk:2600:1010:B06E:8ABA:3C2F:311A:6FCA:8A5|talk]]) to last version by Tegel
Scribunto
text/plain
local p = {}
-- Returns the permission required to perform a given action on a given title.
-- If no title is specified, the title of the page being displayed is used.
function p._main(action, pagename)
local title
if type(pagename) == 'table' and pagename.prefixedText then
title = pagename
elseif pagename then
title = mw.title.new(pagename)
else
title = mw.title.getCurrentTitle()
end
pagename = title.prefixedText
if action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
error( 'First parameter must be one of edit, move, create, upload', 2 )
end
if title.namespace == 8 then -- MediaWiki namespace
if title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page
return 'interfaceadmin'
else -- any non-JS/CSS MediaWiki page
return 'sysop'
end
elseif title.namespace == 2 and title.isSubpage then
if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page
return 'interfaceadmin'
elseif title.contentModel == 'json' then -- user JSON page
return 'sysop'
end
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
if level == 'sysop' or level == 'editprotected' then
return 'sysop'
elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page
return 'sysop'
elseif action == 'move' then
local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.
if blacklistentry and not blacklistentry.params.autoconfirmed then
return 'sysop'
elseif title.namespace == 6 then
return 'sysop'
else
return 'autoconfirmed'
end
end
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
if blacklistentry then
if not blacklistentry.params.autoconfirmed then
return 'sysop'
else
return 'autoconfirmed'
end
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason
return 'autoconfirmed'
elseif level then
return level
elseif action == 'upload' then
return 'uploader'
else
return '*'
end
end
setmetatable(p, { __index = function(t, k)
return function(frame)
return t._main(k, frame.args[1])
end
end })
return p
022c037fc8895cf858d579fcc2b58907ef93a92e
Module:Message box
828
20
37
2023-09-02T14:31:10Z
Pppery
7
Use SVG per edit request
Scribunto
text/plain
-- This is a meta-module for producing message box templates, including
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.
-- Load necessary modules.
require('strict')
local getArgs
local yesno = require('Module:Yesno')
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'}
local TEMPLATE_STYLES = 'Module:Message box/%s.css'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getTitleObject(...)
-- Get the title object, passing the function through pcall
-- in case we are over the expensive function count limit.
local success, title = pcall(mw.title.new, ...)
if success then
return title
end
end
local function union(t1, t2)
-- Returns the union of two arrays.
local vals = {}
for i, v in ipairs(t1) do
vals[v] = true
end
for i, v in ipairs(t2) do
vals[v] = true
end
local ret = {}
for k in pairs(vals) do
table.insert(ret, k)
end
table.sort(ret)
return ret
end
local function getArgNums(args, prefix)
local nums = {}
for k, v in pairs(args) do
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
if num then
table.insert(nums, tonumber(num))
end
end
table.sort(nums)
return nums
end
--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------
local MessageBox = {}
MessageBox.__index = MessageBox
function MessageBox.new(boxType, args, cfg)
args = args or {}
local obj = {}
obj.boxType = boxType
-- Set the title object and the namespace.
obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()
-- Set the config for our box type.
obj.cfg = cfg[boxType]
if not obj.cfg then
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if args.demospace and args.demospace ~= '' then
-- implement demospace parameter of mbox
local demospace = string.lower(args.demospace)
if DEMOSPACES[demospace] then
-- use template from DEMOSPACES
obj.cfg = cfg[DEMOSPACES[demospace]]
obj.boxType = DEMOSPACES[demospace]
elseif string.find( demospace, 'talk' ) then
-- demo as a talk page
obj.cfg = cfg.tmbox
obj.boxType = 'tmbox'
else
-- default to ombox
obj.cfg = cfg.ombox
obj.boxType = 'ombox'
end
elseif ns == 0 then
obj.cfg = cfg.ambox -- main namespace
obj.boxType = 'ambox'
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
obj.boxType = 'imbox'
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
obj.boxType = 'cmbox'
else
local nsTable = mw.site.namespaces[ns]
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
obj.boxType = 'tmbox'
else
obj.cfg = cfg.ombox -- other namespaces or invalid input
obj.boxType = 'ombox'
end
end
end
-- Set the arguments, and remove all blank arguments except for the ones
-- listed in cfg.allowBlankParams.
do
local newArgs = {}
for k, v in pairs(args) do
if v ~= '' then
newArgs[k] = v
end
end
for i, param in ipairs(obj.cfg.allowBlankParams or {}) do
newArgs[param] = args[param]
end
obj.args = newArgs
end
-- Define internal data structure.
obj.categories = {}
obj.classes = {}
-- For lazy loading of [[Module:Category handler]].
obj.hasCategories = false
return setmetatable(obj, MessageBox)
end
function MessageBox:addCat(ns, cat, sort)
if not cat then
return nil
end
if sort then
cat = string.format('[[Category:%s|%s]]', cat, sort)
else
cat = string.format('[[Category:%s]]', cat)
end
self.hasCategories = true
self.categories[ns] = self.categories[ns] or {}
table.insert(self.categories[ns], cat)
end
function MessageBox:addClass(class)
if not class then
return nil
end
self.classes[class] = 1
end
function MessageBox:removeClass(class)
if not class then
return nil
end
self.classes[class] = nil
end
function MessageBox:setParameters()
local args = self.args
local cfg = self.cfg
-- Get type data.
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeError = cfg.showInvalidTypeError
and self.type
and not typeData
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
self.typeImage = typeData.image
-- Find if the box has been wrongly substituted.
self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'
-- Find whether we are using a small message box.
self.isSmall = cfg.allowSmall and (
cfg.smallParam and args.small == cfg.smallParam
or not cfg.smallParam and yesno(args.small)
)
-- Add attributes, classes and styles.
self.id = args.id
self.name = args.name
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
end
if self.name then
self:addClass('box-' .. string.gsub(self.name,' ','_'))
end
local plainlinks = yesno(args.plainlinks)
if plainlinks == true then
self:addClass('plainlinks')
elseif plainlinks == false then
self:removeClass('plainlinks')
end
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
end
self:addClass(self.typeClass)
self:addClass(args.class)
self.style = args.style
self.attrs = args.attrs
-- Set text style.
self.textstyle = args.textstyle
-- Find if we are on the template page or not. This functionality is only
-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory
-- and cfg.templateCategoryRequireName are set.
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
if self.useCollapsibleTextFields
or cfg.templateCategory
and cfg.templateCategoryRequireName
then
if self.name then
local templateName = mw.ustring.match(
self.name,
'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'
) or self.name
templateName = 'Template:' .. templateName
self.templateTitle = getTitleObject(templateName)
end
self.isTemplatePage = self.templateTitle
and mw.title.equals(self.title, self.templateTitle)
end
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
if self.useCollapsibleTextFields then
-- Get the self.issue value.
if self.isSmall and args.smalltext then
self.issue = args.smalltext
else
local sect
if args.sect == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. args.sect
end
local issue = args.issue
issue = type(issue) == 'string' and issue ~= '' and issue or nil
local text = args.text
text = type(text) == 'string' and text or nil
local issues = {}
table.insert(issues, sect)
table.insert(issues, issue)
table.insert(issues, text)
self.issue = table.concat(issues, ' ')
end
-- Get the self.talk value.
local talk = args.talk
-- Show talk links on the template page or template subpages if the talk
-- parameter is blank.
if talk == ''
and self.templateTitle
and (
mw.title.equals(self.templateTitle, self.title)
or self.title:isSubpageOf(self.templateTitle)
)
then
talk = '#'
elseif talk == '' then
talk = nil
end
if talk then
-- If the talk value is a talk page, make a link to that page. Else
-- assume that it's a section heading, and make a link to the talk
-- page of the current page with that section heading.
local talkTitle = getTitleObject(talk)
local talkArgIsTalkPage = true
if not talkTitle or not talkTitle.isTalkPage then
talkArgIsTalkPage = false
talkTitle = getTitleObject(
self.title.text,
mw.site.namespaces[self.title.namespace].talk.id
)
end
if talkTitle and talkTitle.exists then
local talkText = 'Relevant discussion may be found on'
if talkArgIsTalkPage then
talkText = string.format(
'%s [[%s|%s]].',
talkText,
talk,
talkTitle.prefixedText
)
else
talkText = string.format(
'%s the [[%s#%s|talk page]].',
talkText,
talkTitle.prefixedText,
talk
)
end
self.talk = talkText
end
end
-- Get other values.
self.fix = args.fix ~= '' and args.fix or nil
local date
if args.date and args.date ~= '' then
date = args.date
elseif args.date == '' and self.isTemplatePage then
date = lang:formatDate('F Y')
end
if date then
self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date)
end
self.info = args.info
if yesno(args.removalnotice) then
self.removalNotice = cfg.removalNotice
end
end
-- Set the non-collapsible text field. At the moment this is used by all box
-- types other than ambox, and also by ambox when small=yes.
if self.isSmall then
self.text = args.smalltext or args.text
else
self.text = args.text
end
-- Set the below row.
self.below = cfg.below and args.below
-- General image settings.
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
end
-- Left image settings.
local imageLeft = self.isSmall and args.smallimage or args.image
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
or not cfg.imageCheckBlank and imageLeft ~= 'none'
then
self.imageLeft = imageLeft
if not imageLeft then
local imageSize = self.isSmall
and (cfg.imageSmallSize or '30x30px')
or '40x40px'
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage
or 'Information icon4.svg', imageSize)
end
end
-- Right image settings.
local imageRight = self.isSmall and args.smallimageright or args.imageright
if not (cfg.imageRightNone and imageRight == 'none') then
self.imageRight = imageRight
end
end
function MessageBox:setMainspaceCategories()
local args = self.args
local cfg = self.cfg
if not cfg.allowMainspaceCategories then
return nil
end
local nums = {}
for _, prefix in ipairs{'cat', 'category', 'all'} do
args[prefix .. '1'] = args[prefix]
nums = union(nums, getArgNums(args, prefix))
end
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
date = type(date) == 'string' and date
local preposition = 'from'
for _, num in ipairs(nums) do
local mainCat = args['cat' .. tostring(num)]
or args['category' .. tostring(num)]
local allCat = args['all' .. tostring(num)]
mainCat = type(mainCat) == 'string' and mainCat
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = string.format('%s %s %s', mainCat, preposition, date)
self:addCat(0, catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat(0, 'Articles with invalid date parameter in template')
end
elseif mainCat and (not date or date == '') then
self:addCat(0, mainCat)
end
if allCat then
self:addCat(0, allCat)
end
end
end
function MessageBox:setTemplateCategories()
local args = self.args
local cfg = self.cfg
-- Add template categories.
if cfg.templateCategory then
if cfg.templateCategoryRequireName then
if self.isTemplatePage then
self:addCat(10, cfg.templateCategory)
end
elseif not self.title.isSubpage then
self:addCat(10, cfg.templateCategory)
end
end
-- Add template error categories.
if cfg.templateErrorCategory then
local templateErrorCategory = cfg.templateErrorCategory
local templateCat, templateSort
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
for i, param in ipairs(paramsToCheck) do
if not args[param] then
count = count + 1
end
end
if count > 0 then
templateCat = templateErrorCategory
templateSort = tostring(count)
end
if self.categoryNums and #self.categoryNums > 0 then
templateCat = templateErrorCategory
templateSort = 'C'
end
end
self:addCat(10, templateCat, templateSort)
end
end
function MessageBox:setAllNamespaceCategories()
-- Set categories for all namespaces.
if self.isSubstituted then
self:addCat('all', 'Pages with incorrectly substituted templates')
end
end
function MessageBox:setCategories()
if self.title.namespace == 0 then
self:setMainspaceCategories()
elseif self.title.namespace == 10 then
self:setTemplateCategories()
end
self:setAllNamespaceCategories()
end
function MessageBox:renderCategories()
if not self.hasCategories then
-- No categories added, no need to pass them to Category handler so,
-- if it was invoked, it would return the empty string.
-- So we shortcut and return the empty string.
return ""
end
-- Convert category tables to strings and pass them through
-- [[Module:Category handler]].
return require('Module:Category handler')._main{
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
all = table.concat(self.categories.all or {}),
nocat = self.args.nocat,
page = self.args.page
}
end
function MessageBox:export()
local root = mw.html.create()
-- Add the subst check error.
if self.isSubstituted and self.name then
root:tag('b')
:addClass('error')
:wikitext(string.format(
'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.',
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
))
end
-- Add TemplateStyles
root:wikitext(mw.getCurrentFrame():extensionTag{
name = 'templatestyles',
args = { src = TEMPLATE_STYLES:format(self.boxType) },
})
-- Create the box table.
local boxTable
-- Check for fmbox because not all interface messages have mw-parser-output
-- which is necessary for TemplateStyles. Add the wrapper class if it is and
-- then start the actual mbox, else start the mbox.
if self.boxType == 'fmbox' then
boxTable = root:tag('div')
:addClass('mw-parser-output')
:tag('table')
else
boxTable = root:tag('table')
end
boxTable:attr('id', self.id or nil)
for class, _ in pairs(self.classes or {}) do
boxTable:addClass(class or nil)
end
boxTable
:cssText(self.style or nil)
:attr('role', 'presentation')
if self.attrs then
boxTable:attr(self.attrs)
end
-- Add the left-hand image.
local row = boxTable:tag('tr')
if self.imageLeft then
local imageLeftCell = row:tag('td'):addClass('mbox-image')
if self.imageCellDiv then
-- If we are using a div, redefine imageLeftCell so that the image
-- is inside it. Divs use style="width: 52px;", which limits the
-- image width to 52px. If any images in a div are wider than that,
-- they may overlap with the text or cause other display problems.
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
end
imageLeftCell:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- some don't. The old template code in templates where empty cells are
-- specified gives the following hint: "No image. Cell with some width
-- or padding necessary for text cell to have 100% width."
row:tag('td')
:addClass('mbox-empty-cell')
:cssText(self.imageEmptyCellStyle or nil)
end
-- Add the text.
local textCell = row:tag('td'):addClass('mbox-text')
if self.useCollapsibleTextFields then
-- The message box uses advanced text parameters that allow things to be
-- collapsible. At the moment, only ambox uses this.
textCell:cssText(self.textstyle or nil)
local textCellDiv = textCell:tag('div')
textCellDiv
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
textCellDiv:tag('span')
:addClass('hide-when-compact')
:wikitext(self.talk and (' ' .. self.talk) or nil)
:wikitext(self.fix and (' ' .. self.fix) or nil)
end
textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)
if self.info and not self.isSmall then
textCellDiv
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
if self.removalNotice then
textCellDiv:tag('small')
:addClass('hide-when-compact')
:tag('i')
:wikitext(string.format(" (%s)", self.removalNotice))
end
else
-- Default text formatting - anything goes.
textCell
:cssText(self.textstyle or nil)
:wikitext(self.text or nil)
end
-- Add the right-hand image.
if self.imageRight then
local imageRightCell = row:tag('td'):addClass('mbox-imageright')
if self.imageCellDiv then
-- If we are using a div, redefine imageRightCell so that the image
-- is inside it.
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
end
imageRightCell
:wikitext(self.imageRight or nil)
end
-- Add the below row.
if self.below then
boxTable:tag('tr')
:tag('td')
:attr('colspan', self.imageRight and '3' or '2')
:addClass('mbox-text')
:cssText(self.textstyle or nil)
:wikitext(self.below or nil)
end
-- Add error message for invalid type parameters.
if self.invalidTypeError then
root:tag('div')
:css('text-align', 'center')
:wikitext(string.format(
'This message box is using an invalid "type=%s" parameter and needs fixing.',
self.type or ''
))
end
-- Add categories.
root:wikitext(self:renderCategories() or nil)
return tostring(root)
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p, mt = {}, {}
function p._exportClasses()
-- For testing.
return {
MessageBox = MessageBox
}
end
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))
box:setParameters()
box:setCategories()
return box:export()
end
function mt.__index(t, k)
return function (frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))
end
end
return setmetatable(p, mt)
05da6c4f204e9877c212b3df9fc8bad71389715a
Module:Message box/configuration
828
21
39
2023-09-02T14:34:24Z
Pppery
7
Use SVG per edit request
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Message box configuration --
-- --
-- This module contains configuration data for [[Module:Message box]]. --
--------------------------------------------------------------------------------
return {
ambox = {
types = {
speedy = {
class = 'ambox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'ambox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
warning = { -- alias for content
class = 'ambox-content',
image = 'OOjs UI icon notice-warning.svg'
},
content = {
class = 'ambox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ambox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ambox-notice',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'notice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
allowSmall = true,
smallParam = 'left',
smallClass = 'mbox-small-left',
substCheck = true,
classes = {'metadata', 'plainlinks', 'ambox'},
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = 'article',
allowMainspaceCategories = true,
templateCategory = 'Article message templates',
templateCategoryRequireName = true,
templateErrorCategory = nil,
templateErrorParamsToCheck = {'issue', 'fix', 'subst'}
},
cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'cmbox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
content = {
class = 'cmbox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'cmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'cmbox-notice',
image = 'OOjs UI icon information-progressive.svg'
},
caution = {
class = 'cmbox-style',
image = 'Ambox warning yellow.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'plainlinks', 'cmbox'},
imageEmptyCell = true
},
fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'OOjs UI icon clock-destructive.svg'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'OOjs UI icon information-progressive.svg'
},
system = {
class = 'fmbox-system',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'system',
showInvalidTypeError = true,
classes = {'plainlinks', 'fmbox'},
imageEmptyCell = false,
imageRightNone = false
},
imbox = {
types = {
speedy = {
class = 'imbox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'imbox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
content = {
class = 'imbox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'imbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox-license.svg'
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'imbox'},
usePlainlinksParam = true,
imageEmptyCell = true,
below = true,
templateCategory = 'File message boxes'
},
ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'ombox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
warning = { -- alias for content
class = 'ombox-content',
image = 'OOjs UI icon notice-warning.svg'
},
content = {
class = 'ombox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ombox-notice',
image = 'OOjs UI icon information-progressive.svg'
},
critical = {
class = 'mbox-critical',
image = 'OOjs UI icon clock-destructive.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'plainlinks', 'ombox'},
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true
},
tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'tmbox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
content = {
class = 'tmbox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'tmbox-notice',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'plainlinks', 'tmbox'},
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = 'Talk message boxes'
}
}
47b6480268da53e29e5a36e44330750ddb2daab5
Template:TemplateData header
10
48
93
2023-09-05T22:03:06Z
mediawikiwiki>Shirayuki
0
Marked this version for translation
wikitext
text/x-wiki
<noinclude>
<languages/>
<onlyinclude>{{#switch:<translate></translate>
|=
<div class="templatedata-header"><!--
-->{{#if:{{yesno|{{{editlinks|}}}}}<!--
-->|{{#ifexpr:<!--
-->{{#if:{{{docpage|}}}<!--
-->|{{#ifeq:{{FULLPAGENAME}}|{{transclude|{{{docpage}}}}}|0|1}}<!--
-->|not{{IsDocSubpage|false=0}}<!--
-->}}<!--
-->|{{Navbar|{{{docpage|{{BASEPAGENAME}}/doc}}}|plain=1|brackets=1|style=float:{{dir|{{PAGELANGUAGE}}|left|right}};}}<!--
-->}}<!--
-->}}
{{#if:{{{noheader|}}}||<translate><!--T:1--> This is the [[<tvar name=1>Special:MyLanguage/Help:TemplateData</tvar>|TemplateData]] documentation for this template used by [[<tvar name=2>Special:MyLanguage/VisualEditor</tvar>|VisualEditor]] and other tools.</translate>}}
'''{{{1|{{BASEPAGENAME}}}}}'''
</div><includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|<!--
-->|{{#if:{{IsDocSubpage|false=}}<!--
-->|[[Category:TemplateData documentation{{#translation:}}]]<!--
-->|[[Category:Templates using TemplateData{{#translation:}}]]<!--
-->}}<!--
-->}}</includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:TemplateData header|noshift=1|uselang={{#if:{{pagelang}}|{{pagelang}}|{{int:lang}}}}}}
}}</onlyinclude>
{{Documentation|content=
<translate><!--T:3--> Inserts a brief header for the template data section.</translate>
<translate><!--T:4--> Adds the <tvar name=1>/doc</tvar> subpage to <tvar name=2>{{ll|Category:TemplateData documentation}}</tvar> and the template page to <tvar name=3>{{ll|Category:Templates using TemplateData}}</tvar>.</translate>
<translate>
== Usage == <!--T:2-->
</translate>
{{#tag:syntaxhighlight|
==TemplateData== or ==Parameters== or ==Usage==
{{((}}TemplateData header{{))}}
{{^(}}templatedata{{)^}}{
...
}{{^(}}/templatedata{{)^}}
|lang=html
}}
<translate>
<!--T:5-->
Use {{<tvar name=1>tmpl|0=<code>{{((}}TemplateData header{{!}}$1{{))}}</code></tvar>|Template name}} to display a name for the template other than the default, which is <tvar name="2">{{ll|Help:Magic words#Variables|<nowiki>{{BASEPAGENAME}}</nowiki>}}</tvar>.
</translate>
<dl><dd>
{{TemplateData header|Template name}}
</dd></dl>
<translate>
<!--T:6-->
Use <tvar name="1"><code><nowiki>{{TemplateData header|noheader=1}}</nowiki></code></tvar> to omit the first sentence of the header text.
</translate>
<dl><dd>
{{TemplateData header|noheader=1}}
</dd></dl>
<translate>
==Parameters== <!--T:7-->
</translate>
{{TemplateData header/doc}}
}}
</noinclude>
fb4d205deeaf9a9cf1191b38b29e14095265870b
Template:Module other
10
31
59
2023-09-07T15:12:29Z
Clump
9
Reverted edits by [[Special:Contribs/106.216.224.165|106.216.224.165]] ([[User talk:106.216.224.165|talk]]) to last version by Clump
wikitext
text/x-wiki
{{#switch:
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"-->
| {{#ifeq:{{NAMESPACE}}|{{ns:Module}}
| module
| other
}}
}}
| module = {{{1|}}}
| other
| #default = {{{2|}}}
}}<!--End switch--><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
5a2444103b3cffc028f4dc0de2e8a278f87c7129
Template:Used in system
10
82
162
2023-09-17T07:23:01Z
mediawikiwiki>Shirayuki
0
new tvar syntax
wikitext
text/x-wiki
<noinclude>
<languages />
</noinclude>{{#switch:<translate></translate>
| =
{{ombox
| type = content
| text =
'''<translate><!--T:1--> This <tvar name=1>{{lcfirst:{{NAMESPACE}}}}</tvar> is used {{<tvar name=2>#if:{{{1|}}}|{{{1}}}</tvar>|in system messages}}.</translate>'''<br/>
<translate><!--T:2--> Changes to it can cause immediate changes to the MediaWiki user interface.</translate> <!--
-->{{tmpl|0=<translate><!--T:3--> To avoid large-scale disruption, any changes should first be tested in this <tvar name=1>{{lcfirst:{{NAMESPACE}}}}</tvar>'s [[<tvar name=2>$1/sandbox</tvar>|/sandbox]] or [[<tvar name=3>$1/testcases</tvar>|/testcases]] subpage, or in your own [[<tvar name=4>Special:MyLanguage/Help:Subpages</tvar>|user space]].</translate>
|1={{#switch: {{SUBPAGENAME}}
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}
| #default = {{SUBJECTPAGENAME}}
}}<!--#switch-->
}}<!--tmpl--><!--
--><translate><!--T:4--> The tested changes can then be added in one single edit to this <tvar name=1>{{lcfirst:{{NAMESPACE}}}}</tvar>.</translate> <!--
-->{{tmpl|0=<translate><!--T:5--> Please discuss any changes {{<tvar name=1>#if:{{{2|}}}</tvar>|at <tvar name=2>[[{{{2}}}]]</tvar>|on the [[<tvar name=3>$1</tvar>|talk page]]}} before implementing them.</translate>
|1={{#switch: {{SUBPAGENAME}}
| doc | sandbox = {{TALKSPACE}}:{{BASEPAGENAME}}
| #default = {{TALKPAGENAME}}
}}<!--#switch-->
}}<!--tmpl-->
}}
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:Used in system|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{documentation}}
</noinclude>
78c2f7340eb7a3f85d04e21dbe492d6004c209f5
Template:Note
10
79
156
2023-10-04T16:14:31Z
mediawikiwiki>Krinkle
0
compat alias 'notice' to 'info'
wikitext
text/x-wiki
<languages/>
<onlyinclude>{{#if: {{{1|{{{content|{{{text|{{{demo|<noinclude>demo</noinclude>}}}}}}}}}}}} | <templatestyles src="Note/styles.css" /><div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}}
|gotcha=error
|warning=warn
|notice=info
|=info
|#default={{{2|{{{type|}}}}}}
}} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{content|{{{text}}}}}}}}}</div>
| [[File:OOjs UI icon lightbulb-yellow.svg|18px|alt=<translate><!--T:1--> Note</translate>|link=]] '''<translate><!--T:2--> Note:</translate>''' }}<!--
--></onlyinclude>
{{documentation|content=
<translate>
== Usage == <!--T:3-->
</translate>
<pre>
{{Note|text=Foo}}
{{Note|type=info|text=Foo}}
{{Note|type=reminder|text=Foo}}
{{Note|type=reminder|text=Multiple<br>lines<br>of<br>text}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} <translate nowrap><!--T:6--> Loose test</translate>
* Text {{Note|inline=1|text=Foo}}
</pre>
{{Note|text=Foo}}
{{Note|type=info|text=Foo}}
{{Note|type=reminder|text=Foo}}
{{Note|type=reminder|text=Multiple<br>lines<br>of<br>text}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} <translate><!--T:4--> Loose test</translate>
* Text {{Note|inline=1|text=Foo}}
== Parameters ==
{{Note/doc}}
== See also ==
* {{tl|warn}}, shortcut for this template with <code>type=warning</code>.
* {{tl|mbox}}, and in particular the namespace-agnostic {{tl|ombox}}, which by default resembles a typical "info" template.
}}
[[Category:Templates{{#translation:}}|{{PAGENAME}}]]
9ca8639dde6299d75c337d46db3ef58bf3fb0294
Template:Documentation subpage
10
40
77
2023-11-09T22:40:56Z
mediawikiwiki>Clump
0
Reverted edits by [[Special:Contribs/203.211.106.117|203.211.106.117]] ([[User talk:203.211.106.117|talk]]) to last version by ~aanzx
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude>{{#switch:<translate></translate>
| =
<includeonly><!--
-->{{#if:{{IsDocSubpage|override={{{override|doc}}}|false=}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:OOjs UI icon book-ltr.svg|40px|alt=|link=]]
| text =
'''<translate><!--T:4--> This is a [[w:Wikipedia:Template documentation|documentation]] [[<tvar name=2>Special:MyLanguage/Help:Subpages</tvar>|subpage]] for <tvar name=1>{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}</tvar>.</translate>'''<br /><!--
-->{{#if:{{{text2|}}}{{{text1|}}}
|<translate><!--T:5--> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>{{{text2|{{{text1}}}}}}</tvar>.</translate>
|<translate><!--T:10--> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>{{SUBJECTSPACE}}</tvar> page.</translate>
}}
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}}
| Template | Project = Template
| Module = Module
| User = User
| #default = MediaWiki
}} documentation pages{{#translation:}}]]
| [[Category:Documentation subpages without corresponding pages{{#translation:}}]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:Documentation subpage|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{Documentation|content=
<translate>
== Usage == <!--T:6-->
<!--T:7-->
Use this template on Template Documentation subpage (/doc).
== See also == <!--T:8-->
</translate>
*{{tl|Documentation}}
*{{tl|tl}}
}}
</noinclude>
0d6a10a903dbd572fffeb01aff5983d9b3abc65c
Template:Flatlist/styles.css
10
41
79
2023-11-28T21:30:34Z
mediawikiwiki>94rain
0
Protected "[[Template:Flatlist/styles.css]]": Highly visible page or template: 12060 transclusions ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
sanitized-css
text/css
/**
* Style for horizontal lists (separator following item).
* @source https://www.mediawiki.org/wiki/Snippets/Horizontal_lists
* @revision 9 (2016-08-10)
* @author [[User:Edokter]]
*/
.hlist dl,
.hlist ol,
.hlist ul {
margin: 0;
padding: 0;
}
/* Display list items inline */
.hlist dd,
.hlist dt,
.hlist li {
/* don't trust the note that says margin doesn't work with inline
* removing margin: 0 makes dds have margins again */
margin: 0;
display: inline;
}
/* Display nested lists inline */
/*
We remove .inline since it's not used here.
.hlist.inline,
.hlist.inline dl,
.hlist.inline ol,
.hlist.inline ul,
*/
.hlist dl dl, .hlist dl ol, .hlist dl ul,
.hlist ol dl, .hlist ol ol, .hlist ol ul,
.hlist ul dl, .hlist ul ol, .hlist ul ul {
display: inline;
}
/* Hide empty list items */
.hlist .mw-empty-li,
.hlist .mw-empty-elt {
display: none;
}
/* Generate interpuncts */
.hlist dt:after {
content: ": ";
}
.hlist dd:after,
.hlist li:after {
content: " · ";
font-weight: bold;
}
.hlist dd:last-child:after,
.hlist dt:last-child:after,
.hlist li:last-child:after {
content: none;
}
/* Add parentheses around nested lists */
.hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before,
.hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before,
.hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before {
content: " (";
font-weight: normal;
}
.hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after,
.hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after,
.hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after {
content: ")";
font-weight: normal;
}
/* Put ordinals in front of ordered list items */
.hlist ol {
counter-reset: listitem;
}
.hlist ol > li {
counter-increment: listitem;
}
.hlist ol > li:before {
content: " " counter(listitem) "\a0";
}
.hlist dd ol > li:first-child:before,
.hlist dt ol > li:first-child:before,
.hlist li ol > li:first-child:before {
content: " (" counter(listitem) "\a0";
}
9e75e584c328c44948ca9aae5c1cb4fa3c76a622
Template:Navbox
10
32
61
2023-11-28T21:48:35Z
94rain
8
Protected "[[Template:Navbox]]": Highly visible page or template: 5015 transclusions ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
wikitext
text/x-wiki
<includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
fe9b964401f895918ee4fe078678f1722a3c41ec
Module:Navbar
828
23
43
2023-12-05T03:57:44Z
94rain
8
Protected "[[Module:Navbar]]": Highly visible page or template: 4908 transclusions ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
Scribunto
text/plain
local p = {}
local getArgs
local ul
function p.addItem (mini, full, link, descrip, args, url)
local l
if url then
l = {'[', '', ']'}
else
l = {'[[', '|', ']]'}
end
ul:tag('li')
:addClass('nv-'..full)
:wikitext(l[1] .. link .. l[2])
:tag(args.mini and 'abbr' or 'span')
:attr('title', descrip..' this template')
:cssText(args.fontstyle)
:wikitext(args.mini and mini or full)
:done()
:wikitext(l[3])
end
function p.brackets (position, c, args, div)
if args.brackets then
div
:tag('span')
:css('margin-'..position, '-0.125em')
:cssText(args.fontstyle)
:wikitext(c)
end
end
function p._navbar(args)
local show = {true, true, true, false, false, false}
local titleArg = 1
if args.collapsible then
titleArg = 2
if not args.plain then args.mini = 1 end
if args.fontcolor then
args.fontstyle = 'color:' .. args.fontcolor .. ';'
end
args.style = 'float:left; text-align:left'
end
if args.template then
titleArg = 'template'
show = {true, false, false, false, false, false}
local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6}
for k,v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do
local num = index[v]
if num then show[num] = true end
end
end
if args.noedit then show[3] = false end
local titleText = args[titleArg] or (':' .. mw.getCurrentFrame():getParent():getTitle())
local title = mw.title.new(mw.text.trim(titleText), 'Template')
if not title then
error('Invalid title ' .. titleText)
end
local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or ''
local div = mw.html.create():tag('div')
div
:addClass('plainlinks')
:addClass('hlist')
:addClass('navbar')
:cssText(args.style)
if args.mini then div:addClass('mini') end
if not (args.mini or args.plain) then
div
:tag('span')
:css('word-spacing', 0)
:cssText(args.fontstyle)
:wikitext(args.text or 'This box:')
:wikitext(' ')
end
p.brackets('right', '[ ', args, div)
ul = div:tag('ul')
if show[1] then p.addItem('v', 'view', title.fullText, 'View', args) end
if show[2] then p.addItem('t', 'talk', talkpage, 'Discuss', args) end
if show[3] then p.addItem('e', 'edit', title:fullUrl('action=edit'), 'Edit', args, true) end
if show[4] then p.addItem('h', 'hist', title:fullUrl('action=history'), 'History of', args, true) end
if show[5] then
local move = mw.title.new ('Special:Movepage')
p.addItem('m', 'move', move:fullUrl('target='..title.fullText), 'Move', args, true) end
if show[6] then p.addItem('w', 'watch', title:fullUrl('action=watch'), 'Watch', args, true) end
p.brackets('left', ' ]', args, div)
if args.collapsible then
div
:done()
:tag('div')
:css('font-size', '114%')
:css('margin', args.mini and '0 4em' or '0 7em')
:cssText(args.fontstyle)
:wikitext(args[1])
end
-- DELIBERATE DELTA FROM EN.WP THAT INTEGRATES HLIST TSTYLES
-- CARE WHEN SYNCING
local frame = mw.getCurrentFrame()
return frame:extensionTag{
name = 'templatestyles', args = { src = 'Flatlist/styles.css' }
} .. frame:extensionTag{
name = 'templatestyles', args = { src = 'Module:Navbar/styles.css' }
} .. tostring(div:done())
end
function p.navbar(frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return p._navbar(getArgs(frame))
end
return p
b074bbe764eb1a5909241d11390e2612477d429a
Module:Navbox
828
24
45
2023-12-05T03:58:03Z
94rain
8
Protected "[[Module:Navbox]]": Highly visible page or template: 4899 transclusions ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
Scribunto
text/plain
--
-- This module implements {{Navbox}}
--
local p = {}
local navbar = require('Module:Navbar')._navbar
local getArgs -- lazily initialized
local args
local border
local listnums
local ODD_EVEN_MARKER = '\127_ODDEVEN_\127'
local RESTART_MARKER = '\127_ODDEVEN0_\127'
local REGEX_MARKER = '\127_ODDEVEN(%d?)_\127'
local function striped(wikitext)
-- Return wikitext with markers replaced for odd/even striping.
-- Child (subgroup) navboxes are flagged with a category that is removed
-- by parent navboxes. The result is that the category shows all pages
-- where a child navbox is not contained in a parent navbox.
local orphanCat = '[[Category:Navbox orphans]]'
if border == 'subgroup' and args.orphan ~= 'yes' then
-- No change; striping occurs in outermost navbox.
return wikitext .. orphanCat
end
local first, second = 'odd', 'even'
if args.evenodd then
if args.evenodd == 'swap' then
first, second = second, first
else
first = args.evenodd
second = first
end
end
local changer
if first == second then
changer = first
else
local index = 0
changer = function (code)
if code == '0' then
-- Current occurrence is for a group before a nested table.
-- Set it to first as a valid although pointless class.
-- The next occurrence will be the first row after a title
-- in a subgroup and will also be first.
index = 0
return first
end
index = index + 1
return index % 2 == 1 and first or second
end
end
local regex = orphanCat:gsub('([%[%]])', '%%%1')
return (wikitext:gsub(regex, ''):gsub(REGEX_MARKER, changer)) -- () omits gsub count
end
local function processItem(item, nowrapitems)
if item:sub(1, 2) == '{|' then
-- Applying nowrap to lines in a table does not make sense.
-- Add newlines to compensate for trim of x in |parm=x in a template.
return '\n' .. item ..'\n'
end
if nowrapitems == 'yes' then
local lines = {}
for line in (item .. '\n'):gmatch('([^\n]*)\n') do
local prefix, content = line:match('^([*:;#]+)%s*(.*)')
if prefix and not content:match('^<span class="nowrap">') then
line = prefix .. '<span class="nowrap">' .. content .. '</span>'
end
table.insert(lines, line)
end
item = table.concat(lines, '\n')
end
if item:match('^[*:;#]') then
return '\n' .. item ..'\n'
end
return item
end
-- Separate function so that we can evaluate properly whether hlist should
-- be added by the module
local function has_navbar()
return args.navbar ~= 'off' and args.navbar ~= 'plain' and not
(not args.name and mw.getCurrentFrame():getParent():getTitle():gsub('/sandbox$', '') == 'Template:Navbox')
end
local function renderNavBar(titleCell)
if has_navbar() then
titleCell:wikitext(navbar{
args.name,
-- we depend on this being mini = 1 when the navbox module decides
-- to add hlist templatestyles. we also depend on navbar outputting
-- a copy of the hlist templatestyles.
mini = 1,
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;box-shadow:none; padding:0;'
})
end
end
--
-- Title row
--
local function renderTitleRow(tbl)
if not args.title then return end
local titleRow = tbl:tag('tr')
if args.titlegroup then
titleRow
:tag('th')
:attr('scope', 'row')
:addClass('navbox-group')
:addClass(args.titlegroupclass)
:cssText(args.basestyle)
:cssText(args.groupstyle)
:cssText(args.titlegroupstyle)
:wikitext(args.titlegroup)
end
local titleCell = titleRow:tag('th'):attr('scope', 'col')
if args.titlegroup then
titleCell
:addClass('navbox-title1')
end
local titleColspan = 2
if args.imageleft then titleColspan = titleColspan + 1 end
if args.image then titleColspan = titleColspan + 1 end
if args.titlegroup then titleColspan = titleColspan - 1 end
titleCell
:cssText(args.basestyle)
:cssText(args.titlestyle)
:addClass('navbox-title')
:attr('colspan', titleColspan)
renderNavBar(titleCell)
titleCell
:tag('div')
-- id for aria-labelledby attribute
:attr('id', mw.uri.anchorEncode(args.title))
:addClass(args.titleclass)
:css('font-size', '114%')
:css('margin', '0 4em')
:wikitext(processItem(args.title))
end
--
-- Above/Below rows
--
local function getAboveBelowColspan()
local ret = 2
if args.imageleft then ret = ret + 1 end
if args.image then ret = ret + 1 end
return ret
end
local function renderAboveRow(tbl)
if not args.above then return end
tbl:tag('tr')
:tag('td')
:addClass('navbox-abovebelow')
:addClass(args.aboveclass)
:cssText(args.basestyle)
:cssText(args.abovestyle)
:attr('colspan', getAboveBelowColspan())
:tag('div')
-- id for aria-labelledby attribute, if no title
:attr('id', args.title and nil or mw.uri.anchorEncode(args.above))
:wikitext(processItem(args.above, args.nowrapitems))
end
local function renderBelowRow(tbl)
if not args.below then return end
tbl:tag('tr')
:tag('td')
:addClass('navbox-abovebelow')
:addClass(args.belowclass)
:cssText(args.basestyle)
:cssText(args.belowstyle)
:attr('colspan', getAboveBelowColspan())
:tag('div')
:wikitext(processItem(args.below, args.nowrapitems))
end
--
-- List rows
--
local function renderListRow(tbl, index, listnum)
local row = tbl:tag('tr')
if index == 1 and args.imageleft then
row
:tag('td')
:addClass('navbox-image')
:addClass(args.imageclass)
:css('width', '1px') -- Minimize width
:css('padding', '0px 2px 0px 0px')
:cssText(args.imageleftstyle)
:attr('rowspan', #listnums)
:tag('div')
:wikitext(processItem(args.imageleft))
end
if args['group' .. listnum] then
local groupCell = row:tag('th')
-- id for aria-labelledby attribute, if lone group with no title or above
if listnum == 1 and not (args.title or args.above or args.group2) then
groupCell
:attr('id', mw.uri.anchorEncode(args.group1))
end
groupCell
:attr('scope', 'row')
:addClass('navbox-group')
:addClass(args.groupclass)
:cssText(args.basestyle)
:css('width', args.groupwidth or '1%') -- If groupwidth not specified, minimize width
groupCell
:cssText(args.groupstyle)
:cssText(args['group' .. listnum .. 'style'])
:wikitext(args['group' .. listnum])
end
local listCell = row:tag('td')
if args['group' .. listnum] then
listCell
:addClass('navbox-list1')
else
listCell:attr('colspan', 2)
end
if not args.groupwidth then
listCell:css('width', '100%')
end
local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing
if index % 2 == 1 then
rowstyle = args.oddstyle
else
rowstyle = args.evenstyle
end
local listText = args['list' .. listnum]
local oddEven = ODD_EVEN_MARKER
if listText:sub(1, 12) == '</div><table' then
-- Assume list text is for a subgroup navbox so no automatic striping for this row.
oddEven = listText:find('<th[^>]*"navbox%-title"') and RESTART_MARKER or 'odd'
end
listCell
:css('padding', '0px')
:cssText(args.liststyle)
:cssText(rowstyle)
:cssText(args['list' .. listnum .. 'style'])
:addClass('navbox-list')
:addClass('navbox-' .. oddEven)
:addClass(args.listclass)
:addClass(args['list' .. listnum .. 'class'])
:tag('div')
:css('padding', (index == 1 and args.list1padding) or args.listpadding or '0em 0.25em')
:wikitext(processItem(listText, args.nowrapitems))
if index == 1 and args.image then
row
:tag('td')
:addClass('navbox-image')
:addClass(args.imageclass)
:css('width', '1px') -- Minimize width
:css('padding', '0px 0px 0px 2px')
:cssText(args.imagestyle)
:attr('rowspan', #listnums)
:tag('div')
:wikitext(processItem(args.image))
end
end
--
-- Tracking categories
--
local function needsHorizontalLists()
if border == 'subgroup' or args.tracking == 'no' then
return false
end
local listClasses = {
['plainlist'] = true, ['hlist'] = true, ['hlist hnum'] = true,
['hlist hwrap'] = true, ['hlist vcard'] = true, ['vcard hlist'] = true,
['hlist vevent'] = true,
}
return not (listClasses[args.listclass] or listClasses[args.bodyclass])
end
-- there are a lot of list classes in the wild, so we have a function to find
-- them and add their TemplateStyles
local function addListStyles()
local frame = mw.getCurrentFrame()
-- TODO?: Should maybe take a table of classes for e.g. hnum, hwrap as above
-- I'm going to do the stupid thing first though
-- Also not sure hnum and hwrap are going to live in the same TemplateStyles
-- as hlist
local function _addListStyles(htmlclass, templatestyles)
local class_args = { -- rough order of probability of use
'bodyclass', 'listclass', 'aboveclass', 'belowclass', 'titleclass',
'navboxclass', 'groupclass', 'titlegroupclass', 'imageclass'
}
local patterns = {
'^' .. htmlclass .. '$',
'%s' .. htmlclass .. '$',
'^' .. htmlclass .. '%s',
'%s' .. htmlclass .. '%s'
}
local found = false
for _, arg in ipairs(class_args) do
for _, pattern in ipairs(patterns) do
if mw.ustring.find(args[arg] or '', pattern) then
found = true
break
end
end
if found then break end
end
if found then
return frame:extensionTag{
name = 'templatestyles', args = { src = templatestyles }
}
else
return ''
end
end
local hlist_styles = ''
-- navbar always has mini = 1, so here (on this wiki) we can assume that
-- we don't need to output hlist styles in navbox again.
if not has_navbar() then
hlist_styles = _addListStyles('hlist', 'Flatlist/styles.css')
end
local plainlist_styles = _addListStyles('plainlist', 'Plainlist/styles.css')
return hlist_styles .. plainlist_styles
end
local function hasBackgroundColors()
for _, key in ipairs({'titlestyle', 'groupstyle', 'basestyle', 'abovestyle', 'belowstyle'}) do
if tostring(args[key]):find('background', 1, true) then
return true
end
end
end
local function hasBorders()
for _, key in ipairs({'groupstyle', 'basestyle', 'abovestyle', 'belowstyle'}) do
if tostring(args[key]):find('border', 1, true) then
return true
end
end
end
local function isIllegible()
-- require('Module:Color contrast') absent on mediawiki.org
return false
end
local function getTrackingCategories()
local cats = {}
if needsHorizontalLists() then table.insert(cats, 'Navigational boxes without horizontal lists') end
if hasBackgroundColors() then table.insert(cats, 'Navboxes using background colours') end
if isIllegible() then table.insert(cats, 'Potentially illegible navboxes') end
if hasBorders() then table.insert(cats, 'Navboxes using borders') end
return cats
end
local function renderTrackingCategories(builder)
local title = mw.title.getCurrentTitle()
if title.namespace ~= 10 then return end -- not in template space
local subpage = title.subpageText
if subpage == 'doc' or subpage == 'sandbox' or subpage == 'testcases' then return end
for _, cat in ipairs(getTrackingCategories()) do
builder:wikitext('[[Category:' .. cat .. ']]')
end
end
--
-- Main navbox tables
--
local function renderMainTable()
local tbl = mw.html.create('table')
:addClass('nowraplinks')
:addClass(args.bodyclass)
if args.title and (args.state ~= 'plain' and args.state ~= 'off') then
if args.state == 'collapsed' then args.state = 'mw-collapsed' end
tbl
:addClass('mw-collapsible')
:addClass(args.state or 'autocollapse')
end
tbl:css('border-spacing', 0)
if border == 'subgroup' or border == 'none' then
tbl
:addClass('navbox-subgroup')
:cssText(args.bodystyle)
:cssText(args.style)
else -- regular navbox - bodystyle and style will be applied to the wrapper table
tbl
:addClass('navbox-inner')
:css('background', 'transparent')
:css('color', 'inherit')
end
tbl:cssText(args.innerstyle)
renderTitleRow(tbl)
renderAboveRow(tbl)
for i, listnum in ipairs(listnums) do
renderListRow(tbl, i, listnum)
end
renderBelowRow(tbl)
return tbl
end
function p._navbox(navboxArgs)
args = navboxArgs
listnums = {}
for k, _ in pairs(args) do
if type(k) == 'string' then
local listnum = k:match('^list(%d+)$')
if listnum then table.insert(listnums, tonumber(listnum)) end
end
end
table.sort(listnums)
border = mw.text.trim(args.border or args[1] or '')
if border == 'child' then
border = 'subgroup'
end
-- render the main body of the navbox
local tbl = renderMainTable()
-- get templatestyles
local frame = mw.getCurrentFrame()
local base_templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' }
}
local templatestyles = ''
if args.templatestyles and args.templatestyles ~= '' then
templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = args.templatestyles }
}
end
local res = mw.html.create()
-- 'navbox-styles' exists for two reasons:
-- 1. To wrap the styles to work around phab: T200206 more elegantly. Instead
-- of combinatorial rules, this ends up being linear number of CSS rules.
-- 2. To allow MobileFrontend to rip the styles out with 'nomobile' such that
-- they are not dumped into the mobile view.
res:tag('div')
:addClass('navbox-styles')
:addClass('nomobile')
:wikitext(base_templatestyles .. templatestyles)
:done()
-- render the appropriate wrapper around the navbox, depending on the border param
if border == 'none' then
local nav = res:tag('div')
:attr('role', 'navigation')
:wikitext(addListStyles())
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args.title or args.above or (args.group1 and not args.group2) then
nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title or args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
end
elseif border == 'subgroup' then
-- We assume that this navbox is being rendered in a list cell of a
-- parent navbox, and is therefore inside a div with padding:0em 0.25em.
-- We start with a </div> to avoid the padding being applied, and at the
-- end add a <div> to balance out the parent's </div>
res
:wikitext('</div>')
:wikitext(addListStyles())
:node(tbl)
:wikitext('<div>')
else
local nav = res:tag('div')
:attr('role', 'navigation')
:addClass('navbox')
:addClass(args.navboxclass)
:cssText(args.bodystyle)
:cssText(args.style)
:css('padding', '3px')
:wikitext(addListStyles())
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args.title or args.above or (args.group1 and not args.group2) then
nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title or args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
end
end
if (args.nocat or 'false'):lower() == 'false' then
renderTrackingCategories(res)
end
return striped(tostring(res))
end
function p.navbox(frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
args = getArgs(frame, {wrappers = {'Template:Navbox', 'Template:Navbox subgroup'}})
if frame.args.border then
-- This allows Template:Navbox_subgroup to use {{#invoke:Navbox|navbox|border=...}}.
args.border = frame.args.border
end
-- Read the arguments in the order they'll be output in, to make references number in the right order.
local _
_ = args.title
_ = args.above
for i = 1, 20 do
_ = args["group" .. tostring(i)]
_ = args["list" .. tostring(i)]
end
_ = args.below
return p._navbox(args)
end
return p
c0c6a393f9e4e6bc23da95a76f9023013170e3c9
Module:Navbox/styles.css
828
25
47
2023-12-05T03:58:19Z
94rain
8
Protected "[[Module:Navbox/styles.css]]": Highly visible page or template: 4898 transclusions ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
sanitized-css
text/css
.navbox {
border: 1px solid #aaa;
box-sizing: border-box;
width: 100%;
margin: auto;
clear: both;
font-size: 88%;
text-align: center;
padding: 1px;
}
.navbox-inner,
.navbox-subgroup {
width: 100%;
}
.navbox + .navbox-styles + .navbox {
/* Single pixel border between adjacent navboxes */
margin-top: -1px;
}
.navbox th,
.navbox-title,
.navbox-abovebelow {
text-align: center;
/* Title and above/below styles */
padding-left: 1em;
padding-right: 1em;
}
th.navbox-group {
/* Group style */
white-space: nowrap;
/* @noflip */
text-align: right;
}
.navbox,
.navbox-subgroup {
background: #fdfdfd;
}
.navbox-list {
/* Must match background color */
border-color: #fdfdfd;
}
.navbox th,
.navbox-title {
/* Level 1 color */
background: #eaeeff;
}
.navbox-abovebelow,
th.navbox-group,
.navbox-subgroup .navbox-title {
/* Level 2 color */
background: #ddddff;
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
/* Level 3 color */
background: #e6e6ff;
}
.navbox-even {
/* Even row striping */
background: #f7f7f7;
}
.navbox-odd {
/* Odd row striping */
background: transparent;
}
th.navbox-title1 {
border-left: 2px solid #fdfdfd;
width: 100%;
}
td.navbox-list1 {
text-align: left;
border-left-width: 2px;
border-left-style: solid;
}
.navbox .hlist td dl,
.navbox .hlist td ol,
.navbox .hlist td ul,
.navbox td.hlist dl,
.navbox td.hlist ol,
.navbox td.hlist ul {
/* Adjust hlist padding in navboxes */
padding: 0.125em 0;
}
.navbox .hlist dd,
.navbox .hlist dt,
.navbox .hlist li {
/* Nowrap list items in navboxes */
white-space: nowrap;
}
.navbox .hlist dd dl,
.navbox .hlist dt dl,
.navbox .hlist li ol,
.navbox .hlist li ul {
/* But allow parent list items to be wrapped */
white-space: normal;
}
ol + .navbox-styles + .navbox,
ul + .navbox-styles + .navbox {
/* Prevent lists from clinging to navboxes */
margin-top: 0.5em;
}
c4c305dae15bacc8c3240430775fab74f0c10e06
Template:Ombox
10
45
87
2023-12-05T03:58:30Z
mediawikiwiki>94rain
0
Protected "[[Template:Ombox]]": Highly visible page or template: 4842 transclusions ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))
wikitext
text/x-wiki
<onlyinclude>{{#invoke:Message box|ombox}}</onlyinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
f5c3203172e44c84d587cc7824db31d90604ddcb
Main Page
0
1
1
2023-12-13T13:55:08Z
MediaWiki default
1
Create main page
wikitext
text/x-wiki
__NOTOC__
== Welcome to {{SITENAME}}! ==
This Main Page was created automatically and it seems it hasn't been replaced yet.
=== For the bureaucrat(s) of this wiki ===
Hello, and welcome to your new wiki! Thank you for choosing Miraheze for the hosting of your wiki, we hope you will enjoy our hosting.
You can immediately start working on your wiki or whenever you want.
Need help? No problem! We will help you with your wiki as needed. To start, try checking out these helpful links:
* [[mw:Special:MyLanguage/Help:Contents|MediaWiki guide]] (e.g. navigation, editing, deleting pages, blocking users)
* [[meta:Special:MyLanguage/FAQ|Miraheze FAQ]]
* [[meta:Special:MyLanguage/Request features|Request settings changes on your wiki]]. (Extensions, Skin and Logo/Favicon changes should be done through [[Special:ManageWiki]] on your wiki, see [[meta:Special:MyLanguage/ManageWiki|ManageWiki]] for more information.)
==== I still don't understand X! ====
Well, that's no problem. Even if something isn't explained in the documentation/FAQ, we are still happy to help you. You can find us here:
* [[meta:Special:MyLanguage/Help center|On our own Miraheze wiki]]
* On [[phab:|Phabricator]]
* On [https://miraheze.org/discord Discord]
* On IRC in #miraheze on irc.libera.chat ([irc://irc.libera.chat/%23miraheze direct link]; [https://web.libera.chat/?channel=#miraheze webchat])
=== For visitors of this wiki ===
Hello, the default Main Page of this wiki (this page) has not yet been replaced by the bureaucrat(s) of this wiki. The bureaucrat(s) might still be working on a Main Page, so please check again later!
21236ac3f8d65e5563b6da6b70815ca6bf1e6616
MediaWiki:Edittools
8
2
2
2023-12-13T14:54:22Z
HyperNervie
2
Created page with "Click to insert characters: <charinsert label="\t">	</charinsert>"
wikitext
text/x-wiki
Click to insert characters: <charinsert label="\t">	</charinsert>
09b269c002f39b428b215c507d90964ec250f9d1
PvZH Modding Wiki:Sandbox
4
3
3
2023-12-13T18:22:07Z
HyperNervie
2
Created page with "{{#css: pre, code, tt, kbd, samp, .mw-code { font-family: Consolas, 'Courier New', Courier, monospace; } code.key, code.str, code.num, code.keyword { border: none; background-color: transparent; padding: 0; font-weight: bold; } code.key, .mw-highlight .nt { color: #0451a5; } code.str, code.key.string::before, .mw-highlight .s2 { color: #a31515; } code.num, code.key.number::before, .mw-highlight .mi { color: #098658; } code.keyword, code.key.bool::before, .mw-high..."
wikitext
text/x-wiki
{{#css:
pre, code, tt, kbd, samp, .mw-code {
font-family: Consolas, 'Courier New', Courier, monospace;
}
code.key,
code.str,
code.num,
code.keyword {
border: none;
background-color: transparent;
padding: 0;
font-weight: bold;
}
code.key,
.mw-highlight .nt {
color: #0451a5;
}
code.str,
code.key.string::before,
.mw-highlight .s2 {
color: #a31515;
}
code.num,
code.key.number::before,
.mw-highlight .mi {
color: #098658;
}
code.keyword,
code.key.bool::before,
.mw-highlight .kc {
color: #0000ff;
}
code.key.number::before {
content: "123 ";
}
code.key.bool::before {
content: "T/F ";
}
code.key.string::before {
content: "\"S\" ";
}
code.key.list::before {
content: "[,] ";
color: #7b3814;
}
code.key.object::before {
content: "{:} ";
color: #af00db;
}
.treeview {
display: flow-root;
}
.treeview .treeview-header {
padding-left: 3px;
font-weight: bold;
}
.treeview .treeview-header:last-child {
border-color: #707070 !important;
border-left-style: dotted;
}
.treeview .treeview-header:not(:last-child)::before {
content: none;
}
.treeview .treeview-header:last-child::before {
border-bottom: 0;
}
.treeview ul,
.treeview li {
margin: 0;
padding: 0;
list-style-type: none;
list-style-image: none;
}
.treeview li li {
position: relative;
padding-left: 13px;
margin-left: 7px;
border-left: 2px solid #707070;
}
.treeview li li::before {
content: "";
position: absolute;
top: 0;
left: -1.5px;
width: 11px;
height: 11px;
border-bottom: 2px solid #707070;
}
.treeview li li:last-child:not(.treeview-continue) {
border-color: transparent;
}
.treeview li li:last-child:not(.treeview-continue)::before {
border-left: 2px solid #707070;
width: 10px;
}
}}
<code class="key number">number</code> <code class="num">2,147,483,647</code><br>
<code class="key string">string</code> <code class="str">"Hello, world!"</code><br>
<code class="key bool">boolean</code> <code class="keyword">true</code> <code class="keyword">false</code> <code class="keyword">null</code><br>
<code class="key list">list</code><br>
<code class="key object">object</code>
<div class="treeview">
* <code class="key list"></code>The root list that cards.json denotes.
** <code class="key object"></code>Each element of the root list is a card definition object.
*** <code class="key object">entity</code>: A card entity object. How a card actually behaves during gameplay is defined by this object.
</div>
<syntaxhighlight lang="json">
{
"number": 114514,
"string": "Hello, world!",
"boolean": true,
"list": [],
"object": {}
}
</syntaxhighlight>
775823ff4ac0e7a8efa5c2fd0429f92d50c6ac68
8
3
2023-12-14T08:59:02Z
HyperNervie
2
wikitext
text/x-wiki
<code class="key number">number</code> <code class="num">2,147,483,647</code><br>
<code class="key string">string</code> <code class="str">"Hello, world!"</code><br>
<code class="key bool">boolean</code> <code class="keyword">true</code> <code class="keyword">false</code> <code class="keyword">null</code><br>
<code class="key list">list</code><br>
<code class="key object">object</code>
<div class="treeview">
* <code class="key object"></code>The root object that cards.json notates.
** <code class="key object">(guid)</code>: (Replace <code class="key">(guid)</code> with the card's actual [[Glossary#GUID|GUID]]) Each element of the root object is a card definition object.
*** <code class="key object">entity</code>: A card entity object. How a card actually behaves during gameplay is defined by this object.
**** <code class="key list">components</code>: A list of card entity components which determines the actual behaviors of the card.
***** <code class="key object"></code>Each element of the list is a card entity component object.
****** <code class="key string">$type</code>: Component type. Formatted in <code class="str">"PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>.
****** <code class="key object">$data</code>: Component data. Different types of components require different data object structures. This will be discussed in each component's respective page.
*** <code class="key string">prefabName</code>: The prefab name of the card.
*** <code class="key string">baseId</code>: Type of the card. See [[#Card types]] for details.
== Details ==
=== Card types ===
The <code class="key">baseId</code> field of a card definition object identifies the outward type of the card.
{| class="wikitable"
! Value of <code class="key">baseId</code> !! Meaning
|-
| <code class="str">"Base"</code> || Plant
|-
| <code class="str">"BaseZombie"</code> || Zombie
|-
| <code class="str">"BasePlantOneTimeEffect"</code> || Plant Trick
|-
| <code class="str">"BaseZombieOneTimeEffect"</code> || Zombie Trick
|-
| <code class="str">"BasePlantEnvironment"</code> || Plant Environment
|-
| <code class="str">"BaseZombieEnvironment"</code> || Zombie Environment
|}
The <code class="key">isFighter</code> and <code class="key">isEnv</code> fields also indicates the card type.
{| class="wikitable"
! Value of <code class="key">isFighter</code> !! Value of <code class="key">isEnv</code> !! Card type
|-
| <code class="keyword">true</code> || <code class="keyword">false</code> || Plant or Zombie
|-
| <code class="keyword">false</code> || <code class="keyword">false</code> || Trick
|-
| <code class="keyword">false</code> || <code class="keyword">true</code> || Environment
|}
To make a card actual fighter, trick or environment, use neither or either of [[Components.Burst|Burst]] and [[Components.Environment|Environment]] components in the card entity.
</div>
<syntaxhighlight lang="json">
{
"number": 114514,
"string": "Hello, world!",
"boolean": true,
"list": [],
"object": {}
}
</syntaxhighlight>
12d3fe07c9d969cd0e9763796c84f0431491b066
9
8
2023-12-14T09:19:10Z
HyperNervie
2
wikitext
text/x-wiki
<code class="key number">number</code> <code class="num">2,147,483,647</code><br>
<code class="key string">string</code> <code class="str">"Hello, world!"</code><br>
<code class="key bool">boolean</code> <code class="keyword">true</code> <code class="keyword">false</code> <code class="keyword">null</code><br>
<code class="key list">list</code><br>
<code class="key object">object</code>
<div class="treeview">
* <code class="key object"></code>The root object that cards.json notates.
** <code class="key object">(guid)</code>: (Replace <code class="key">(guid)</code> with the card's actual [[Glossary#GUID|GUID]]) Each element of the root object is a card definition object.
*** <code class="key object">entity</code>: A card entity object. How a card actually behaves during gameplay is defined by this object.
**** <code class="key list">components</code>: A list of card entity components which determines the actual behaviors of the card.
***** <code class="key object"></code>Each element of the list is a card entity component object.
****** <code class="key string">$type</code>: Component type. Formatted in <code class="str">"PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>.
****** <code class="key object">$data</code>: Component data. Different types of components require different data object structures. This will be discussed in each component's respective page.
*** <code class="key string">prefabName</code>: The prefab name of the card.
*** <code class="key string">baseId</code>: Type of the card. See [[#Card types]] for details.
*** <code class="key string">color</code>: Class of the card. See [[#Classes]] for details.
</div>
== Details ==
=== Card types ===
The <code class="key">baseId</code> field of a card definition object identifies the outward type of the card.
{| class="wikitable"
! Value of <code class="key">baseId</code> !! Meaning
|-
| <code class="str">"Base"</code> || Plant
|-
| <code class="str">"BaseZombie"</code> || Zombie
|-
| <code class="str">"BasePlantOneTimeEffect"</code> || Plant Trick
|-
| <code class="str">"BaseZombieOneTimeEffect"</code> || Zombie Trick
|-
| <code class="str">"BasePlantEnvironment"</code> || Plant Environment
|-
| <code class="str">"BaseZombieEnvironment"</code> || Zombie Environment
|}
The <code class="key">isFighter</code> and <code class="key">isEnv</code> fields also indicates the card type.
{| class="wikitable"
! Value of <code class="key">isFighter</code> !! Value of <code class="key">isEnv</code> !! Card type
|-
| <code class="keyword">true</code> || <code class="keyword">false</code> || Plant or Zombie
|-
| <code class="keyword">false</code> || <code class="keyword">false</code> || Trick
|-
| <code class="keyword">false</code> || <code class="keyword">true</code> || Environment
|}
To make a card actual fighter, trick or environment, use neither or either of [[Components.Burst|Burst]] and [[Components.Environment|Environment]] components in the card entity.
=== Classes ===
The <code class="key">baseId</code> field of a card definition object identifies the class(es) of the card.
{| class="wikitable"
! Value of <code class="key">color</code> !! Class
|-
| <code class="str">"Guardian"</code> || Guardian
|-
| <code class="str">"Kabloom"</code> || Kabloom
|-
| <code class="str">"MegaGro"</code> || Mega-Grow
|-
| <code class="str">"Smarty"</code> || Smarty
|-
| <code class="str">"Solar"</code> || Solar
|-
| <code class="str">"Hungry"</code> || Beastly
|-
| <code class="str">"Brainy"</code> || Brainy
|-
| <code class="str">"Madcap"</code> || Crazy
|-
| <code class="str">"Hearty"</code> || Hearty
|-
| <code class="str">"Sneaky"</code> || Sneaky
|-
| <code class="str">"0"</code> || (No Class)
|}
If a card has two classes, separate the class names with a comma. (e.g. <code class="str">"Guardian, Kabloom"</code>, whitespace is optional)
Classes play no role during gameplay. Thus there are no class components for card entities. They make a difference only when you're building a deck.
dd09f9da52b1d627f81ed1b60d07f9121459b3cf
10
9
2023-12-14T13:40:00Z
HyperNervie
2
wikitext
text/x-wiki
<code class="key number">number</code> <code class="num">2,147,483,647</code><br>
<code class="key string">string</code> <code class="str">"Hello, world!"</code><br>
<code class="key bool">boolean</code> <code class="keyword">true</code> <code class="keyword">false</code> <code class="keyword">null</code><br>
<code class="key list">list</code><br>
<code class="key object">object</code>
<div class="treeview">
* <code class="key object"></code>The root object that cards.json notates.
** <code class="key object">(guid)</code>: (Replace <code class="key">(guid)</code> with the card's actual [[Glossary#GUID|GUID]]) Each element of the root object is a card definition object.
*** <code class="key object">entity</code>: A card entity object. How a card actually behaves during gameplay is defined by this object.
**** <code class="key list">components</code>: A list of card entity components which determines the actual behaviors of the card.
***** <code class="key object"></code>Each element of the list is a card entity component object. See [[card entity component]] for details.
*** <code class="key string">prefabName</code>: The prefab name of the card.
*** <code class="key string">baseId</code>: Type of the card. See [[#Card types]] for possible values.
*** <code class="key string">color</code>: Class of the card. See [[#Classes]] for possible values.
*** <code class="key string">set</code>: Set of the card. See [[#Sets]] for possible values.
*** <code class="key number">rarity</code>: Rarity of the card. See [[#Rarities]] for possible values.
*** <code class="key string">setAndRarityKey</code>: Translation key of the card's set and rarity. See [[#Set-and-rarity keys]] for possible values.
*** <code class="key number">craftingBuy</code>: Sparks spent for crafting a copy of this card. This is just a client-side value; it doesn't affect the actual number of sparks the card costs, which is server-side. This field doesn't exist for Superpowers and Tokens.
*** <code class="key number">craftingSell</code>: Sparks returned for recycling a copy of this card. This is just a client-side value; it doesn't affect the actual number of sparks the card returns, which is server-side. This field doesn't exist for Superpowers, Tokens and Basic Common cards.
*** <code class="key number">displayHealth</code>: The health value displayed on the card. Use the [[Component/Health|Health]] component to set the fighter's actual health. For Tricks and Environments, this should be set to <code class="num">0</code>.
*** <code class="key number">displayAttack</code>: The strength value displayed on the card. Use the [[Component/Attack|Attack]] component to set the fighter's actual strength. For Tricks and Environments, this should be set to <code class="num">0</code>.
*** <code class="key number">displaySunCost</code>: The sun/brain cost value displayed on the card. Use the [[Component/SunCost|SunCost]] component to set the card's actual cost. This field is still named "display''Sun''Cost" when the card belongs to Zombie faction and costs brains.
*** <code class="key string">faction</code>: Faction where the card belongs. See [[#Factions]] for possible values.
</div>
== Details ==
=== Card types ===
The <code class="key">baseId</code> field of a card definition object identifies the outward type of the card.
{| class="wikitable"
! Value of <code class="key">baseId</code> !! Card type
|-
| <code class="str">"Base"</code> || Plant
|-
| <code class="str">"BaseZombie"</code> || Zombie
|-
| <code class="str">"BasePlantOneTimeEffect"</code> || Plant Trick
|-
| <code class="str">"BaseZombieOneTimeEffect"</code> || Zombie Trick
|-
| <code class="str">"BasePlantEnvironment"</code> || Plant Environment
|-
| <code class="str">"BaseZombieEnvironment"</code> || Zombie Environment
|}
The <code class="key">isFighter</code> and <code class="key">isEnv</code> fields also indicates the card type.
{| class="wikitable"
! Value of <code class="key">isFighter</code> !! Value of <code class="key">isEnv</code> !! Card type
|-
| <code class="keyword">true</code> || <code class="keyword">false</code> || Plant or Zombie
|-
| <code class="keyword">false</code> || <code class="keyword">false</code> || Trick
|-
| <code class="keyword">false</code> || <code class="keyword">true</code> || Environment
|}
To make a card actual fighter, trick or environment, use neither or either of [[Component/Burst|Burst]] and [[Component/Environment|Environment]] components in the card entity.
=== Classes ===
The <code class="key">baseId</code> field of a card definition object identifies the class(es) of the card.
{| class="wikitable"
! Value of <code class="key">color</code> !! Class
|-
| <code class="str">"Guardian"</code> || Guardian
|-
| <code class="str">"Kabloom"</code> || Kabloom
|-
| <code class="str">"MegaGro"</code> || Mega-Grow
|-
| <code class="str">"Smarty"</code> || Smarty
|-
| <code class="str">"Solar"</code> || Solar
|-
| <code class="str">"Hungry"</code> || Beastly
|-
| <code class="str">"Brainy"</code> || Brainy
|-
| <code class="str">"Madcap"</code> || Crazy
|-
| <code class="str">"Hearty"</code> || Hearty
|-
| <code class="str">"Sneaky"</code> || Sneaky
|-
| <code class="str">"0"</code> || (No Class)
|}
If a card has two classes, separate the class names with a comma. (e.g. <code class="str">"Guardian, Kabloom"</code>, whitespace is optional)
Classes play no role during gameplay. Thus there are no class components for card entities. They make a difference only when you're building a deck.
=== Sets ===
The <code class="key">set</code> field of a card definition object identifies the set of the card.
{| class="wikitable"
! Value of <code class="key">set</code> !! Set
|-
| <code class="str">"Hero"</code> || Signature Superpower
|-
| <code class="str">"Superpower"</code> || Non-signature Superpower
|-
| <code class="str">"Token"</code> || Token
|-
| <code class="str">"Silver"</code> || Basic
|-
| <code class="str">"Gold"</code> || Premium
|-
| <code class="str">"Set2"</code> || Galactic Garden
|-
| <code class="str">"Set3"</code> || Colossal Fossil
|-
| <code class="str">"Set4"</code> || Triassic Triumph
|-
| <code class="str">"Event"</code> || Event
|-
| <code class="str">""</code> || Removed Superpower
|-
| <code class="str">"Blank"</code> || Blank
|-
| <code class="str">"Cheats"</code> || Cheats
|-
| <code class="str">"Board"</code> || Board Ability
|}
=== Rarities ===
The <code class="key">rarity</code> field of a card definition object identifies the outward rarity of the card. This affects the banner shown at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">rarity</code> !! Rarity
|-
| <code class="num">0</code> || Uncommon
|-
| <code class="num">1</code> || Rare
|-
| <code class="num">2</code> || Super-Rare
|-
| <code class="num">3</code> || Legendary
|-
| <code class="num">4</code> || Common or Token
|-
| <code class="num">5</code> || Event
|}
Use the [[Component/Rarity|Rarity]] component to set the actual rarity used in gameplay.
=== Set-and-rarity keys ===
The <code class="key">setAndRarityKey</code> field of a card definition object identifies the translation key of the card's set and rarity. The localization is shown on the banner at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">setAndRarityKey</code> !! Localization !! Note
|-
| <code class="str">"Superpower_SuperRare"</code> || Super-Rare || For non-signature superpowers
|-
| <code class="str">"Dawn_Common"</code> || Basic - Common ||
|-
| <code class="str">"Bloom_Common"</code> || Premium - Uncommon ||
|-
| <code class="str">"Bloom_Rare"</code> || Premium - Rare ||
|-
| <code class="str">"Bloom_SuperRare"</code> || Premium - Super-Rare ||
|-
| <code class="str">"Bloom_Legendary"</code> || Premium - Legendary ||
|-
| <code class="str">"Galactic_Common"</code> || Galactic - Uncommon ||
|-
| <code class="str">"Galactic_Rare"</code> || Galactic - Rare ||
|-
| <code class="str">"Galactic_SuperRare"</code> || Galactic - Super-Rare ||
|-
| <code class="str">"Galactic_Legendary"</code> || Galactic - Legendary ||
|-
| <code class="str">"Colossal_Common"</code> || Colossal - Uncommon ||
|-
| <code class="str">"Colossal_Rare"</code> || Colossal - Rare ||
|-
| <code class="str">"Colossal_SuperRare"</code> || Colossal - Super-Rare ||
|-
| <code class="str">"Colossal_Legendary"</code> || Colossal - Legendary ||
|-
| <code class="str">"Triassic_Common"</code> || Triassic - Uncommon || rowspan=4 | English localizations for these four keys are absent due to unknown reasons.
|-
| <code class="str">"Triassic_Rare"</code> || Triassic - Rare
|-
| <code class="str">"Triassic_SuperRare"</code> || Triassic - Super-Rare
|-
| <code class="str">"Triassic_Legendary"</code> || Triassic - Legendary
|-
| <code class="str">"Token"</code> || Token ||
|-
| <code class="str">"Premium_Event"</code> || Event ||
|-
| <code class="str">""</code> or <code class="keyword">null</code> || || No translation key
|}
=== Factions ===
The <code class="key">faction</code> field of a card definition object identifies the outward faction of the card. Use respective card entity component to set the actual faction.
{| class="wikitable"
! Value of <code class="key">faction</code> !! Faction !! Required component
|-
| <code class="str">"Plants"</code> || Plant || [[Component/Plants|Plants]]
|-
| <code class="str">"Zombies"</code> || Zombie || [[Component/Zombies|Zombies]]
|-
| <code class="str">"All"</code> || Board || [[Component/BoardAbility|BoardAbility]]
|}
0b64cb6dabc62399155abeafdeba62ad7434adee
12
10
2023-12-14T14:08:30Z
HyperNervie
2
wikitext
text/x-wiki
<div class="treeview">
* <code class="key object"></code>The root object that cards.json notates.
** <code class="key object">(guid)</code>: (Replace <code class="key">(guid)</code> with the card's actual [[Glossary#GUID|GUID]]) Each element of the root object is a card definition object.
*** <code class="key object">entity</code>: A card entity object. How a card actually behaves during gameplay is defined by this object.
**** <code class="key list">components</code>: A list of card entity components which determines the actual behaviors of the card.
***** <code class="key object"></code>Each element of the list is a card entity component object. See [[card entity component]] for details.
*** <code class="key string">prefabName</code>: The prefab name of the card.
*** <code class="key string">baseId</code>: Type of the card. See [[#Card types]] for possible values.
*** <code class="key string">color</code>: Class of the card. See [[#Classes]] for possible values.
*** <code class="key string">set</code>: Set of the card. See [[#Sets]] for possible values.
*** <code class="key number">rarity</code>: Rarity of the card. See [[#Rarities]] for possible values.
*** <code class="key string">setAndRarityKey</code>: Translation key of the card's set and rarity. See [[#Set-and-rarity keys]] for possible values.
*** <code class="key number">craftingBuy</code>: Sparks spent for crafting a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card costs, which is server-side. This field doesn't exist for Superpowers and Tokens.
*** <code class="key number">craftingSell</code>: Sparks returned for recycling a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card returns, which is server-side. This field doesn't exist for Superpowers, Tokens and Basic Common cards.
*** <code class="key number">displayHealth</code>: The Health value displayed on the card. Use the [[Component/Health|Health]] component to set the Fighter's actual Health. For Tricks and Environments, this should be set to <code class="num">0</code>.
*** <code class="key number">displayAttack</code>: The Strength value displayed on the card. Use the [[Component/Attack|Attack]] component to set the Fighter's actual Strength. For Tricks and Environments, this should be set to <code class="num">0</code>.
*** <code class="key number">displaySunCost</code>: The Sun/Brain cost value displayed on the card. Use the [[Component/SunCost|SunCost]] component to set the card's actual cost. This field is still named "display''Sun''Cost" when the card belongs to Zombie faction and costs Brains.
*** <code class="key string">faction</code>: Faction where the card belongs. See [[#Factions]] for possible values.
*** <code class="key bool">ignoreDeckLimit</code>: Purpose unknown.
*** <code class="key bool">isPower</code>: Whether this card is a Superpower. Use the [[Component/Superpower|Superpower]] component to make the card actual Superpower.
*** <code class="key bool">isPrimaryPower</code>: Whether this card is a Signature Superpower. Use the [[Component/PrimarySuperpower|PrimarySuperpower]] component to make the card actual Signature Superpower.
*** <code class="key bool">isFighter</code>: Whether this card is a Fighter.
*** <code class="key bool">isEnv</code>: Whether this card is an Environment.
*** <code class="key bool">isAquatic</code>: Whether this card is Amphibious. Use the [[Component/Aquatic|Aquatic]] component to make the card actually Amphibious.
*** <code class="key bool">isTeamup</code>: Whether this card has Team-Up. Use the [[Component/Teamup|Teamup]] component to make the card actually have Team-Up.
</div>
== Details ==
=== Card types ===
The <code class="key">baseId</code> field of a card definition object identifies the outward type of the card.
{| class="wikitable"
! Value of <code class="key">baseId</code> !! Card type
|-
| <code class="str">"Base"</code> || Plant
|-
| <code class="str">"BaseZombie"</code> || Zombie
|-
| <code class="str">"BasePlantOneTimeEffect"</code> || Plant Trick
|-
| <code class="str">"BaseZombieOneTimeEffect"</code> || Zombie Trick
|-
| <code class="str">"BasePlantEnvironment"</code> || Plant Environment
|-
| <code class="str">"BaseZombieEnvironment"</code> || Zombie Environment
|}
The <code class="key">isFighter</code> and <code class="key">isEnv</code> fields also indicates the card type.
{| class="wikitable"
! Value of <code class="key">isFighter</code> !! Value of <code class="key">isEnv</code> !! Card type
|-
| <code class="keyword">true</code> || <code class="keyword">false</code> || Plant or Zombie
|-
| <code class="keyword">false</code> || <code class="keyword">false</code> || Trick
|-
| <code class="keyword">false</code> || <code class="keyword">true</code> || Environment
|}
To make a card actual Fighter, Trick or Environment, use neither or either of [[Component/Burst|Burst]] and [[Component/Environment|Environment]] components in the card entity.
=== Classes ===
The <code class="key">baseId</code> field of a card definition object identifies the Class(es) of the card.
{| class="wikitable"
! Value of <code class="key">color</code> !! Class
|-
| <code class="str">"Guardian"</code> || Guardian
|-
| <code class="str">"Kabloom"</code> || Kabloom
|-
| <code class="str">"MegaGro"</code> || Mega-Grow
|-
| <code class="str">"Smarty"</code> || Smarty
|-
| <code class="str">"Solar"</code> || Solar
|-
| <code class="str">"Hungry"</code> || Beastly
|-
| <code class="str">"Brainy"</code> || Brainy
|-
| <code class="str">"Madcap"</code> || Crazy
|-
| <code class="str">"Hearty"</code> || Hearty
|-
| <code class="str">"Sneaky"</code> || Sneaky
|-
| <code class="str">"0"</code> || (No Class)
|}
If a card has two Classes, separate the Class names with a comma. (e.g. <code class="str">"Guardian, Kabloom"</code>, whitespace is optional)
Classes play no role during gameplay. Thus there are no Class components for card entities. They make a difference only when you're building a deck.
=== Sets ===
The <code class="key">set</code> field of a card definition object identifies the set of the card.
{| class="wikitable"
! Value of <code class="key">set</code> !! Set
|-
| <code class="str">"Hero"</code> || Signature Superpower
|-
| <code class="str">"Superpower"</code> || Non-signature Superpower
|-
| <code class="str">"Token"</code> || Token
|-
| <code class="str">"Silver"</code> || Basic
|-
| <code class="str">"Gold"</code> || Premium
|-
| <code class="str">"Set2"</code> || Galactic Garden
|-
| <code class="str">"Set3"</code> || Colossal Fossil
|-
| <code class="str">"Set4"</code> || Triassic Triumph
|-
| <code class="str">"Event"</code> || Event
|-
| <code class="str">""</code> || Removed Superpower
|-
| <code class="str">"Blank"</code> || Blank
|-
| <code class="str">"Cheats"</code> || Cheats
|-
| <code class="str">"Board"</code> || Board Ability
|}
=== Rarities ===
The <code class="key">rarity</code> field of a card definition object identifies the outward rarity of the card. This affects the banner shown at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">rarity</code> !! Rarity
|-
| <code class="num">0</code> || Uncommon
|-
| <code class="num">1</code> || Rare
|-
| <code class="num">2</code> || Super-Rare
|-
| <code class="num">3</code> || Legendary
|-
| <code class="num">4</code> || Common or Token
|-
| <code class="num">5</code> || Event
|}
Use the [[Component/Rarity|Rarity]] component to set the actual rarity used in gameplay.
=== Set-and-rarity keys ===
The <code class="key">setAndRarityKey</code> field of a card definition object identifies the translation key of the card's set and rarity. The localization is shown on the banner at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">setAndRarityKey</code> !! Localization !! Note
|-
| <code class="str">"Superpower_SuperRare"</code> || Super-Rare || For non-signature superpowers
|-
| <code class="str">"Dawn_Common"</code> || Basic - Common ||
|-
| <code class="str">"Bloom_Common"</code> || Premium - Uncommon ||
|-
| <code class="str">"Bloom_Rare"</code> || Premium - Rare ||
|-
| <code class="str">"Bloom_SuperRare"</code> || Premium - Super-Rare ||
|-
| <code class="str">"Bloom_Legendary"</code> || Premium - Legendary ||
|-
| <code class="str">"Galactic_Common"</code> || Galactic - Uncommon ||
|-
| <code class="str">"Galactic_Rare"</code> || Galactic - Rare ||
|-
| <code class="str">"Galactic_SuperRare"</code> || Galactic - Super-Rare ||
|-
| <code class="str">"Galactic_Legendary"</code> || Galactic - Legendary ||
|-
| <code class="str">"Colossal_Common"</code> || Colossal - Uncommon ||
|-
| <code class="str">"Colossal_Rare"</code> || Colossal - Rare ||
|-
| <code class="str">"Colossal_SuperRare"</code> || Colossal - Super-Rare ||
|-
| <code class="str">"Colossal_Legendary"</code> || Colossal - Legendary ||
|-
| <code class="str">"Triassic_Common"</code> || Triassic - Uncommon || rowspan=4 | English localizations for these four keys are absent due to unknown reasons.
|-
| <code class="str">"Triassic_Rare"</code> || Triassic - Rare
|-
| <code class="str">"Triassic_SuperRare"</code> || Triassic - Super-Rare
|-
| <code class="str">"Triassic_Legendary"</code> || Triassic - Legendary
|-
| <code class="str">"Token"</code> || Token ||
|-
| <code class="str">"Premium_Event"</code> || Event ||
|-
| <code class="str">""</code> or <code class="keyword">null</code> || || No translation key
|}
=== Factions ===
The <code class="key">faction</code> field of a card definition object identifies the outward faction of the card. Use respective component in the card entity to set the actual faction.
{| class="wikitable"
! Value of <code class="key">faction</code> !! Faction !! Required component
|-
| <code class="str">"Plants"</code> || Plant || [[Component/Plants|Plants]]
|-
| <code class="str">"Zombies"</code> || Zombie || [[Component/Zombies|Zombies]]
|-
| <code class="str">"All"</code> || Board || [[Component/BoardAbility|BoardAbility]]
|}
3178f69b7fda51163a675c9f087b92e5031140a0
14
12
2023-12-14T15:32:44Z
HyperNervie
2
wikitext
text/x-wiki
<div class="treeview">
* <code class="key object"></code>The card definition object.
** <code class="key object">entity</code>: A card entity object. How a card actually behaves during gameplay is defined by this object.
*** <code class="key list">components</code>: A list of card entity components which determines the actual behaviors of the card.
**** <code class="key object"></code>Each element of the list is a card entity component object. See [[card entity component]] for details.
** <code class="key string">prefabName</code>: The prefab name of the card.
** <code class="key string">baseId</code>: Type of the card. See [[#Card types]] for possible values.
** <code class="key string">color</code>: Class of the card. See [[#Classes]] for possible values.
** <code class="key string">set</code>: Set of the card. See [[#Sets]] for possible values.
** <code class="key number">rarity</code>: Rarity of the card. See [[#Rarities]] for possible values.
** <code class="key string">setAndRarityKey</code>: Translation key of the card's set and rarity. See [[#Set-and-rarity keys]] for possible values.
** <code class="key number">craftingBuy</code>: Sparks spent for crafting a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card costs, which is server-side. This field doesn't exist for Superpowers and Tokens.
** <code class="key number">craftingSell</code>: Sparks returned for recycling a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card returns, which is server-side. This field doesn't exist for Superpowers, Tokens and Basic Common cards.
** <code class="key number">displayHealth</code>: The Health value displayed on the cardface. Use the [[Component/Health|Health]] component to set the Fighter's actual Health. For Tricks and Environments, this should be set to <code class="num">0</code>.
** <code class="key number">displayAttack</code>: The Strength value displayed on the cardface. Use the [[Component/Attack|Attack]] component to set the Fighter's actual Strength. For Tricks and Environments, this should be set to <code class="num">0</code>.
** <code class="key number">displaySunCost</code>: The Sun/Brain cost value displayed on the cardface. Use the [[Component/SunCost|SunCost]] component to set the card's actual cost. This field is still named "display''Sun''Cost" when the card belongs to Zombie faction and costs Brains.
** <code class="key string">faction</code>: Faction where the card belongs. See [[#Factions]] for possible values.
** <code class="key bool">ignoreDeckLimit</code>: Purpose unknown.
** <code class="key bool">isPower</code>: Whether this card is a Superpower. Use the [[Component/Superpower|Superpower]] component to make the card actual Superpower.
** <code class="key bool">isPrimaryPower</code>: Whether this card is a Signature Superpower. Use the [[Component/PrimarySuperpower|PrimarySuperpower]] component to make the card actual Signature Superpower.
** <code class="key bool">isFighter</code>: Whether this card is a Fighter.
** <code class="key bool">isEnv</code>: Whether this card is an Environment.
** <code class="key bool">isAquatic</code>: Whether this card is Amphibious. Use the [[Component/Aquatic|Aquatic]] component to make the card actually Amphibious.
** <code class="key bool">isTeamup</code>: Whether this card has Team-Up. Use the [[Component/Teamup|Teamup]] component to make the card actually have Team-Up.
** <code class="key list">subtypes</code>: A list of the card's subtypes (often referred to as "tribes" in player community). Use the [[Component/Subtypes|Subtypes]] component to set the card's actual subtypes.
*** <code class="key string"></code>Each element of the list is a string that indicates a subtype. See [[Component/Subtypes#Possible subtypes]] for possible values.
** <code class="key list">tags</code>: A list of the card's tags. Some card interactions may rely on tags. Use the [[Component/Tags|Tags]] component to set the card's actual tags.
*** <code class="key string"></code>Each element of the list is a string that indicates a tag. Tag strings can be arbitrary.
** <code class="key list">subtype_affinities</code>: A list of subtypes that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key string"></code>Each element of the list is a string that indicates a subtype.
** <code class="key list">subtype_affinity_weight</code>: Affinity weights of the subtypes in the <code class="key">subtype_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective subtype of <code class="key">subtype_affinities</code>.
** <code class="key list">tag_affinities</code>: A list of tags that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key string"></code>Each element of the list is a string that indicates a tag.
** <code class="key list">tag_affinity_weight</code>: Affinity weights of the tags in the <code class="key">tag_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective tag of <code class="key">tag_affinities</code>.
** <code class="key list">card_affinities</code>: A list of cards that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key number"></code>Each element of the list is an integer that indicates the GUID of a card.
** <code class="key list">card_affinity_weight</code>: Affinity weights of the cards in the <code class="key">card_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective card of <code class="key">card_affinities</code>.
** <code class="key bool">usable</code>: Whether this card is usable during gameplay. Use the [[Component/Unusable|Unusable]] component to make the card actually unusable.
** <code class="key list">special_abilities</code>: A list of the card's special abilities. It affects the Strength and Health icons ''on the cardface''. For Tricks and Environments, this list should be empty. To set the actual abilities of a card, use proper components (typically [[Component/EffectEntityDescriptor|EffectEntityDescriptor]]) in the card entity.
*** <code class="key string"></code>Each element of the list is a string that indicates a special ability. See [[#Special abilities]] for possible values.
</div>
== Details ==
=== Card types ===
The <code class="key">baseId</code> field of a card definition object identifies the outward type of the card.
{| class="wikitable"
! Value of <code class="key">baseId</code> !! Card type
|-
| <code class="str">"Base"</code> || Plant
|-
| <code class="str">"BaseZombie"</code> || Zombie
|-
| <code class="str">"BasePlantOneTimeEffect"</code> || Plant Trick
|-
| <code class="str">"BaseZombieOneTimeEffect"</code> || Zombie Trick
|-
| <code class="str">"BasePlantEnvironment"</code> || Plant Environment
|-
| <code class="str">"BaseZombieEnvironment"</code> || Zombie Environment
|}
The <code class="key">isFighter</code> and <code class="key">isEnv</code> fields also indicates the card type.
{| class="wikitable"
! Value of <code class="key">isFighter</code> !! Value of <code class="key">isEnv</code> !! Card type
|-
| <code class="keyword">true</code> || <code class="keyword">false</code> || Plant or Zombie
|-
| <code class="keyword">false</code> || <code class="keyword">false</code> || Trick
|-
| <code class="keyword">false</code> || <code class="keyword">true</code> || Environment
|}
To make a card actual Fighter, Trick or Environment, use neither or either of [[Component/Burst|Burst]] and [[Component/Environment|Environment]] components in the card entity.
=== Classes ===
The <code class="key">baseId</code> field of a card definition object identifies the Class(es) of the card. It decides the background color of the cardface.
{| class="wikitable"
! Value of <code class="key">color</code> !! Class
|-
| <code class="str">"Guardian"</code> || Guardian
|-
| <code class="str">"Kabloom"</code> || Kabloom
|-
| <code class="str">"MegaGro"</code> || Mega-Grow
|-
| <code class="str">"Smarty"</code> || Smarty
|-
| <code class="str">"Solar"</code> || Solar
|-
| <code class="str">"Hungry"</code> || Beastly
|-
| <code class="str">"Brainy"</code> || Brainy
|-
| <code class="str">"Madcap"</code> || Crazy
|-
| <code class="str">"Hearty"</code> || Hearty
|-
| <code class="str">"Sneaky"</code> || Sneaky
|-
| <code class="str">"0"</code> || (No Class)
|}
If a card has two Classes, separate the Class names with a comma. (e.g. <code class="str">"Guardian, Kabloom"</code>, whitespace is optional)
Classes play no role during gameplay. Thus there are no Class components for card entities. They make a difference only when you're building a deck.
=== Sets ===
The <code class="key">set</code> field of a card definition object identifies the set of the card.
{| class="wikitable"
! Value of <code class="key">set</code> !! Set
|-
| <code class="str">"Hero"</code> || Signature Superpower
|-
| <code class="str">"Superpower"</code> || Non-signature Superpower
|-
| <code class="str">"Token"</code> || Token
|-
| <code class="str">"Silver"</code> || Basic
|-
| <code class="str">"Gold"</code> || Premium
|-
| <code class="str">"Set2"</code> || Galactic Garden
|-
| <code class="str">"Set3"</code> || Colossal Fossil
|-
| <code class="str">"Set4"</code> || Triassic Triumph
|-
| <code class="str">"Event"</code> || Event
|-
| <code class="str">""</code> || Removed Superpower
|-
| <code class="str">"Blank"</code> || Blank
|-
| <code class="str">"Cheats"</code> || Cheats
|-
| <code class="str">"Board"</code> || Board Ability
|}
=== Rarities ===
The <code class="key">rarity</code> field of a card definition object identifies the outward rarity of the card. This affects the banner shown at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">rarity</code> !! Rarity
|-
| <code class="num">0</code> || Uncommon
|-
| <code class="num">1</code> || Rare
|-
| <code class="num">2</code> || Super-Rare
|-
| <code class="num">3</code> || Legendary
|-
| <code class="num">4</code> || Common or Token
|-
| <code class="num">5</code> || Event
|}
Use the [[Component/Rarity|Rarity]] component to set the actual rarity used in gameplay.
=== Set-and-rarity keys ===
The <code class="key">setAndRarityKey</code> field of a card definition object identifies the translation key of the card's set and rarity. The localization is shown on the banner at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">setAndRarityKey</code> !! Localization !! Note
|-
| <code class="str">"Superpower_SuperRare"</code> || Super-Rare || For non-signature superpowers
|-
| <code class="str">"Dawn_Common"</code> || Basic - Common ||
|-
| <code class="str">"Bloom_Common"</code> || Premium - Uncommon ||
|-
| <code class="str">"Bloom_Rare"</code> || Premium - Rare ||
|-
| <code class="str">"Bloom_SuperRare"</code> || Premium - Super-Rare ||
|-
| <code class="str">"Bloom_Legendary"</code> || Premium - Legendary ||
|-
| <code class="str">"Galactic_Common"</code> || Galactic - Uncommon ||
|-
| <code class="str">"Galactic_Rare"</code> || Galactic - Rare ||
|-
| <code class="str">"Galactic_SuperRare"</code> || Galactic - Super-Rare ||
|-
| <code class="str">"Galactic_Legendary"</code> || Galactic - Legendary ||
|-
| <code class="str">"Colossal_Common"</code> || Colossal - Uncommon ||
|-
| <code class="str">"Colossal_Rare"</code> || Colossal - Rare ||
|-
| <code class="str">"Colossal_SuperRare"</code> || Colossal - Super-Rare ||
|-
| <code class="str">"Colossal_Legendary"</code> || Colossal - Legendary ||
|-
| <code class="str">"Triassic_Common"</code> || Triassic - Uncommon || rowspan=4 | English localizations for these four keys are absent due to unknown reasons.
|-
| <code class="str">"Triassic_Rare"</code> || Triassic - Rare
|-
| <code class="str">"Triassic_SuperRare"</code> || Triassic - Super-Rare
|-
| <code class="str">"Triassic_Legendary"</code> || Triassic - Legendary
|-
| <code class="str">"Token"</code> || Token ||
|-
| <code class="str">"Premium_Event"</code> || Event ||
|-
| <code class="str">""</code> or <code class="keyword">null</code> || || No translation key
|}
=== Factions ===
The <code class="key">faction</code> field of a card definition object identifies the outward faction of the card. Use respective component in the card entity to set the actual faction.
{| class="wikitable"
! Value of <code class="key">faction</code> !! Faction !! Required component
|-
| <code class="str">"Plants"</code> || Plant || [[Component/Plants|Plants]]
|-
| <code class="str">"Zombies"</code> || Zombie || [[Component/Zombies|Zombies]]
|-
| <code class="str">"All"</code> || Board || [[Component/BoardAbility|BoardAbility]]
|}
=== Special abilities ===
The <code class="key">special_abilties</code> list of a card definition object determines the ability icons shown ''on the cardface''.
{| class="wikitable"
! String value !! Ability
|-
| <code class="str">"Ambush"</code> || Anti-Hero
|-
| <code class="str">"Armor"</code> || Armored
|-
| <code class="str">"AttackOverride"</code> || Attack using Health
|-
| <code class="str">"Truestrike"</code> || Bullseye
|-
| <code class="str">"Deadly"</code> || Deadly
|-
| <code class="str">"Repeater"</code> || Double Strike
|-
| <code class="str">"Frenzy"</code> || Frenzy
|-
| <code class="str">"Overshoot"</code> || Overshoot
|-
| <code class="str">"Strikethrough"</code> || Strikethrough
|-
| <code class="str">"Unique"</code> || Unique
|-
| <code class="str">"Untrickable"</code> || Untrickable
|}
If an ability...
* doesn't match any of the abilities listed in the table above (except Unique)
* is not Aquatic, Team-Up nor Gravestone
* is not a "When played", "When revealed" or "While in your hand" ability
Then it matches Unique. The icon for Unique is a golden star below the middle of the Strength and Health icons.
To affect the Strength and Health icons used when the Fighter is ''in play'', use the [[Component/ShowTriggeredIcon|ShowTriggeredIcon]] component in the card entity.
9ecee8b37cfaac04eccad26dee512ae9884ad4a4
Category:Sandbox
14
4
4
2023-12-14T07:03:14Z
HyperNervie
2
Created page with " "
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
Category:Glossary
14
5
5
2023-12-14T08:03:13Z
HyperNervie
2
Created page with " "
wikitext
text/x-wiki
da39a3ee5e6b4b0d3255bfef95601890afd80709
Glossary
0
6
6
2023-12-14T08:07:22Z
HyperNervie
2
Added GUID
wikitext
text/x-wiki
;<span id="GUID">GUID</span>
:Short for "'''g'''lobally '''u'''nique '''id'''entifier". Each card has a positive integer as its GUID.
75ce446b3870b2c1f09c7c3031fe50678785050f
MediaWiki:Common.css
8
7
7
2023-12-14T08:21:05Z
HyperNervie
2
Created page with "/* CSS placed here will be applied to all skins */ pre, code, tt, kbd, samp, .mw-code { font-family: Consolas, 'Courier New', Courier, monospace; } code.key, code.str, code.num, code.keyword { border: none; background-color: transparent; padding: 0; font-weight: bold; } code.key, .mw-highlight .nt { color: #0451a5; } code.str, code.key.string::before, .mw-highlight .s2 { color: #a31515; } code.num, code.key.number::before, .mw-highlight .mi { color: #098658; } co..."
css
text/css
/* CSS placed here will be applied to all skins */
pre, code, tt, kbd, samp, .mw-code {
font-family: Consolas, 'Courier New', Courier, monospace;
}
code.key,
code.str,
code.num,
code.keyword {
border: none;
background-color: transparent;
padding: 0;
font-weight: bold;
}
code.key,
.mw-highlight .nt {
color: #0451a5;
}
code.str,
code.key.string::before,
.mw-highlight .s2 {
color: #a31515;
}
code.num,
code.key.number::before,
.mw-highlight .mi {
color: #098658;
}
code.keyword,
code.key.bool::before,
.mw-highlight .kc {
color: #0000ff;
}
code.key.number::before {
content: "123 ";
}
code.key.bool::before {
content: "T/F ";
}
code.key.string::before {
content: "\"S\" ";
}
code.key.list::before {
content: "[,] ";
color: #7b3814;
}
code.key.object::before {
content: "{:} ";
color: #af00db;
}
/* JSON treeview styles, adapted from Minecraft Wiki */
.treeview {
display: flow-root;
}
.treeview .treeview-header {
padding-left: 3px;
font-weight: bold;
}
.treeview .treeview-header:last-child {
border-color: #707070 !important;
border-left-style: dotted;
}
.treeview .treeview-header:not(:last-child)::before {
content: none;
}
.treeview .treeview-header:last-child::before {
border-bottom: 0;
}
.treeview ul,
.treeview li {
margin: 0;
padding: 0;
list-style-type: none;
list-style-image: none;
}
.treeview li li {
position: relative;
padding-left: 13px;
margin-left: 7px;
border-left: 2px solid #707070;
}
.treeview li li::before {
content: "";
position: absolute;
top: 0;
left: -1.5px;
width: 11px;
height: 11px;
border-bottom: 2px solid #707070;
}
.treeview li li:last-child:not(.treeview-continue) {
border-color: transparent;
}
.treeview li li:last-child:not(.treeview-continue)::before {
border-left: 2px solid #707070;
width: 10px;
}
03552afc734a3452153ad0ae4fdaac3041e4a04f
11
7
2023-12-14T14:05:37Z
HyperNervie
2
css
text/css
/* CSS placed here will be applied to all skins */
pre, code, tt, kbd, samp, .mw-code {
font-family: Consolas, 'Courier New', Courier, monospace;
}
code.key,
code.str,
code.num,
code.keyword {
border: none;
background-color: transparent;
padding: 0;
font-weight: bold;
}
code.key,
.mw-highlight .nt {
color: #0451a5;
}
code.str,
code.key.string::before,
.mw-highlight .s2 {
color: #a31515;
}
code.num,
code.key.number::before,
.mw-highlight .mi {
color: #098658;
}
code.keyword,
code.key.bool::before,
.mw-highlight .kc {
color: #0000ff;
}
code.key.number::before {
content: "123";
}
code.key.bool::before {
content: "T/F";
}
code.key.string::before {
content: "\"S\"";
}
code.key.list::before {
content: "[,]";
color: #7b3814;
}
code.key.object::before {
content: "{:}";
color: #af00db;
}
code.key.number::before,
code.key.bool::before,
code.key.string::before,
code.key.list::before,
code.key.object::before {
margin-right: 4px;
}
/* JSON treeview styles, adapted from Minecraft Wiki */
.treeview {
display: flow-root;
}
.treeview .treeview-header {
padding-left: 3px;
font-weight: bold;
}
.treeview .treeview-header:last-child {
border-color: #707070 !important;
border-left-style: dotted;
}
.treeview .treeview-header:not(:last-child)::before {
content: none;
}
.treeview .treeview-header:last-child::before {
border-bottom: 0;
}
.treeview ul,
.treeview li {
margin: 0;
padding: 0;
list-style-type: none;
list-style-image: none;
}
.treeview li li {
position: relative;
padding-left: 13px;
margin-left: 7px;
border-left: 2px solid #707070;
}
.treeview li li::before {
content: "";
position: absolute;
top: 0;
left: -1.5px;
width: 11px;
height: 11px;
border-bottom: 2px solid #707070;
}
.treeview li li:last-child:not(.treeview-continue) {
border-color: transparent;
}
.treeview li li:last-child:not(.treeview-continue)::before {
border-left: 2px solid #707070;
width: 10px;
}
5883f16249030d5b78b6e32166379b6987bafada
13
11
2023-12-14T14:39:27Z
HyperNervie
2
css
text/css
/* CSS placed here will be applied to all skins */
pre, code, tt, kbd, samp, .mw-code {
font-family: Consolas, 'Courier New', Courier, monospace;
}
code.key,
code.str,
code.num,
code.keyword {
border: none;
background-color: transparent;
padding: 0;
font-weight: bold;
}
code.key,
.mw-highlight .nt {
color: #0451a5;
}
code.str,
code.key.string::before,
.mw-highlight .s2 {
color: #a31515;
}
code.num,
code.key.number::before,
.mw-highlight .mi {
color: #098658;
}
code.keyword,
code.key.bool::before,
.mw-highlight .kc {
color: #0000ff;
}
code.key.number::before {
content: "123";
}
code.key.bool::before {
content: "T/F";
}
code.key.string::before {
content: "\"S\"";
}
code.key.list::before {
content: "[,]";
color: #7b3814;
}
code.key.object::before {
content: "{:}";
color: #af00db;
}
code.key.number::before,
code.key.bool::before,
code.key.string::before,
code.key.list::before,
code.key.object::before {
margin-right: 6px;
}
/* JSON treeview styles, adapted from Minecraft Wiki */
.treeview {
display: flow-root;
}
.treeview .treeview-header {
padding-left: 3px;
font-weight: bold;
}
.treeview .treeview-header:last-child {
border-color: #707070 !important;
border-left-style: dotted;
}
.treeview .treeview-header:not(:last-child)::before {
content: none;
}
.treeview .treeview-header:last-child::before {
border-bottom: 0;
}
.treeview ul,
.treeview li {
margin: 0;
padding: 0;
list-style-type: none;
list-style-image: none;
}
.treeview li li {
position: relative;
padding-left: 13px;
margin-left: 7px;
border-left: 2px solid #707070;
}
.treeview li li::before {
content: "";
position: absolute;
top: 0;
left: -1.5px;
width: 11px;
height: 11px;
border-bottom: 2px solid #707070;
}
.treeview li li:last-child:not(.treeview-continue) {
border-color: transparent;
}
.treeview li li:last-child:not(.treeview-continue)::before {
border-left: 2px solid #707070;
width: 10px;
}
f7461c7f25ad079de891bdb7bc15e8586a57b723
15
13
2023-12-15T12:28:11Z
HyperNervie
2
css
text/css
/* CSS placed here will be applied to all skins */
pre, code, tt, kbd, samp, .mw-code {
font-family: Consolas, 'Courier New', Courier, monospace;
}
code.key,
code.str,
code.num,
code.keyword {
border: none;
background-color: transparent;
padding: 0;
font-weight: bold;
}
code.key,
.mw-highlight-lang-json .nt {
color: #0451a5;
}
code.str,
code.key.string::before,
.mw-highlight-lang-json .s2 {
color: #a31515;
}
code.num,
code.key.number::before,
.mw-highlight-lang-json .mi,
.mw-highlight-lang-json .mf {
color: #098658;
}
code.keyword,
code.key.bool::before,
.mw-highlight-lang-json .kc {
color: #0000ff;
}
code.key.number::before {
content: "123";
}
code.key.bool::before {
content: "T/F";
}
code.key.string::before {
content: "\"S\"";
}
code.key.list::before {
content: "[,]";
color: #7b3814;
}
code.key.object::before {
content: "{:}";
color: #af00db;
}
code.key.number::before,
code.key.bool::before,
code.key.string::before,
code.key.list::before,
code.key.object::before {
margin-right: 6px;
}
/* JSON treeview styles, adapted from Minecraft Wiki */
.treeview {
display: flow-root;
}
.treeview .treeview-header {
padding-left: 3px;
font-weight: bold;
}
.treeview .treeview-header:last-child {
border-color: #707070 !important;
border-left-style: dotted;
}
.treeview .treeview-header:not(:last-child)::before {
content: none;
}
.treeview .treeview-header:last-child::before {
border-bottom: 0;
}
.treeview ul,
.treeview li {
margin: 0;
padding: 0;
list-style-type: none;
list-style-image: none;
}
.treeview li li {
position: relative;
padding-left: 13px;
margin-left: 7px;
border-left: 2px solid #707070;
}
.treeview li li::before {
content: "";
position: absolute;
top: 0;
left: -1.5px;
width: 11px;
height: 11px;
border-bottom: 2px solid #707070;
}
.treeview li li:last-child:not(.treeview-continue) {
border-color: transparent;
}
.treeview li li:last-child:not(.treeview-continue)::before {
border-left: 2px solid #707070;
width: 10px;
}
dcabb1b2795b76260e1b286579332e1e752888b4
16
15
2023-12-15T12:49:29Z
HyperNervie
2
css
text/css
/* CSS placed here will be applied to all skins */
pre, code, tt, kbd, samp, .mw-code {
font-family: Consolas, 'Courier New', Courier, monospace;
}
code.key,
code.str,
code.num,
code.keyword {
border: none;
background-color: transparent;
padding: 0;
font-weight: bold;
}
code.key,
.mw-highlight-lang-json .nt {
color: #0451a5;
}
code.str,
code.key.string::before,
.mw-highlight-lang-json .s2 {
color: #a31515;
}
code.num,
code.key.number::before,
.mw-highlight-lang-json .mi,
.mw-highlight-lang-json .mf {
color: #098658;
}
code.keyword,
code.key.bool::before,
.mw-highlight-lang-json .kc {
color: #0000ff;
}
code.key.number::before {
content: "123";
}
code.key.bool::before {
content: "T/F";
}
code.key.string::before {
content: "\"S\"";
}
code.key.list::before {
content: "[,]";
color: #7b3814;
}
code.key.object::before {
content: "{:}";
color: #af00db;
}
code.key.number::before,
code.key.bool::before,
code.key.string::before,
code.key.list::before,
code.key.object::before {
margin-right: 6px;
}
.mw-highlight-lang-json .err,
.mw-highlight-lang-json .err + .kc,
.mw-highlight-lang-json .err + .w + .kc,
.mw-highlight-lang-json .err + .kc + .w + .kc {
color: #080;
font-weight: normal;
}
/* JSON treeview styles, adapted from Minecraft Wiki
See https://minecraft.wiki/w/MediaWiki:Gadget-site-styles.css
*/
.treeview {
display: flow-root;
}
.treeview .treeview-header {
padding-left: 3px;
font-weight: bold;
}
.treeview .treeview-header:last-child {
border-color: #707070 !important;
border-left-style: dotted;
}
.treeview .treeview-header:not(:last-child)::before {
content: none;
}
.treeview .treeview-header:last-child::before {
border-bottom: 0;
}
.treeview ul,
.treeview li {
margin: 0;
padding: 0;
list-style-type: none;
list-style-image: none;
}
.treeview li li {
position: relative;
padding-left: 13px;
margin-left: 7px;
border-left: 2px solid #707070;
}
.treeview li li::before {
content: "";
position: absolute;
top: 0;
left: -1.5px;
width: 11px;
height: 11px;
border-bottom: 2px solid #707070;
}
.treeview li li:last-child:not(.treeview-continue) {
border-color: transparent;
}
.treeview li li:last-child:not(.treeview-continue)::before {
border-left: 2px solid #707070;
width: 10px;
}
b962cc1c65acde75f268e7c7058808645dd3b898
Cards.json
0
8
17
2023-12-15T13:13:03Z
HyperNervie
2
Created page with "'''cards.json''' is where stats and abilities of cards are defined. By editing this file, cards may behave differently during gameplay. On the Android version, cards.json is located in the <code>Android/data/com.ea.gp.pvzheroes/files/cache/bundles/files/loc/card_data_172</code> bundle. == JSON structure == cards.json notates an object that holds the definition of all cards of the game. The object uses card [[Glossary#GUID|GUIDs]] as keys, and the values are '''card def..."
wikitext
text/x-wiki
'''cards.json''' is where stats and abilities of cards are defined. By editing this file, cards may behave differently during gameplay.
On the Android version, cards.json is located in the <code>Android/data/com.ea.gp.pvzheroes/files/cache/bundles/files/loc/card_data_172</code> bundle.
== JSON structure ==
cards.json notates an object that holds the definition of all cards of the game. The object uses card [[Glossary#GUID|GUIDs]] as keys, and the values are '''card definition objects''' that define cards with corresponding GUIDs.
<syntaxhighlight lang="json">
{
"1": {
/* Definition object of card #1 */
},
"2": {
/* Definition object of card #2 */
},
"3": {
/* Definition object of card #3 */
},
/* And so on... */
}
</syntaxhighlight>
Card definition objects hold the following structure:
<tabber>
|-|Treeview=
<div class="treeview">
* <code class="key object"></code>The card definition object.
** <code class="key object">entity</code>: A card entity object. How a card actually behaves during gameplay is defined by this object.
*** <code class="key list">components</code>: A list of card entity components which determines the actual behaviors of the card.
**** <code class="key object"></code>Each element of the list is a card entity component object. See [[card entity component]] for details.
** <code class="key string">prefabName</code>: The [[Glossary#Prefab|prefab]] name of the card.
** <code class="key string">baseId</code>: Type of the card. See [[#Card types]] for possible values.
** <code class="key string">color</code>: Class of the card. See [[#Classes]] for possible values.
** <code class="key string">set</code>: Set of the card. See [[#Sets]] for possible values.
** <code class="key number">rarity</code>: Rarity of the card. See [[#Rarities]] for possible values.
** <code class="key string">setAndRarityKey</code>: Translation key of the card's set and rarity. See [[#Set-and-rarity keys]] for possible values.
** <code class="key number">craftingBuy</code>: Sparks spent for crafting a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card costs, which is server-side. This field doesn't exist for Superpowers and Tokens.
** <code class="key number">craftingSell</code>: Sparks returned for recycling a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card returns, which is server-side. This field doesn't exist for Superpowers, Tokens and Basic Common cards.
** <code class="key number">displayHealth</code>: The Health value displayed on the cardface. Use the [[Component/Health|Health]] component to set the Fighter's actual Health. For Tricks and Environments, this should be set to <code class="num">0</code>.
** <code class="key number">displayAttack</code>: The Strength value displayed on the cardface. Use the [[Component/Attack|Attack]] component to set the Fighter's actual Strength. For Tricks and Environments, this should be set to <code class="num">0</code>.
** <code class="key number">displaySunCost</code>: The Sun/Brain cost value displayed on the cardface. Use the [[Component/SunCost|SunCost]] component to set the card's actual cost. This field is still named "display''Sun''Cost" when the card belongs to Zombie faction and costs Brains.
** <code class="key string">faction</code>: Faction where the card belongs. See [[#Factions]] for possible values.
** <code class="key bool">ignoreDeckLimit</code>: Purpose unknown.
** <code class="key bool">isPower</code>: Whether this card is a Superpower. Use the [[Component/Superpower|Superpower]] component to make the card actual Superpower.
** <code class="key bool">isPrimaryPower</code>: Whether this card is a Signature Superpower. Use the [[Component/PrimarySuperpower|PrimarySuperpower]] component to make the card actual Signature Superpower.
** <code class="key bool">isFighter</code>: Whether this card is a Fighter.
** <code class="key bool">isEnv</code>: Whether this card is an Environment.
** <code class="key bool">isAquatic</code>: Whether this card is Amphibious. Use the [[Component/Aquatic|Aquatic]] component to make the card actually Amphibious.
** <code class="key bool">isTeamup</code>: Whether this card has Team-Up. Use the [[Component/Teamup|Teamup]] component to make the card actually have Team-Up.
** <code class="key list">subtypes</code>: A list of the card's subtypes (often referred to as "tribes" in player community). Use the [[Component/Subtypes|Subtypes]] component to set the card's actual subtypes.
*** <code class="key string"></code>Each element of the list is a string that indicates a subtype. See [[Component/Subtypes#Possible subtypes]] for possible values.
** <code class="key list">tags</code>: A list of the card's tags. Some card interactions may rely on tags. Use the [[Component/Tags|Tags]] component to set the card's actual tags.
*** <code class="key string"></code>Each element of the list is a string that indicates a tag. Tag strings can be arbitrary.
** <code class="key list">subtype_affinities</code>: A list of subtypes that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key string"></code>Each element of the list is a string that indicates a subtype.
** <code class="key list">subtype_affinity_weight</code>: Affinity weights of the subtypes in the <code class="key">subtype_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective subtype of <code class="key">subtype_affinities</code>.
** <code class="key list">tag_affinities</code>: A list of tags that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key string"></code>Each element of the list is a string that indicates a tag.
** <code class="key list">tag_affinity_weight</code>: Affinity weights of the tags in the <code class="key">tag_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective tag of <code class="key">tag_affinities</code>.
** <code class="key list">card_affinities</code>: A list of cards that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key number"></code>Each element of the list is an integer that indicates the GUID of a card.
** <code class="key list">card_affinity_weight</code>: Affinity weights of the cards in the <code class="key">card_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective card of <code class="key">card_affinities</code>.
** <code class="key bool">usable</code>: Whether this card is usable during gameplay. Use the [[Component/Unusable|Unusable]] component to make the card actually unusable.
** <code class="key list">special_abilities</code>: A list of the card's special abilities. It affects the Strength and Health icons ''on the cardface''. For Tricks and Environments, this list should be empty. To set the actual abilities of a card, use proper components in the card entity.
*** <code class="key string"></code>Each element of the list is a string that indicates a special ability. See [[#Special abilities]] for possible values.
</div>
|-|Source=
<syntaxhighlight lang="json">
{
"entity": {
"components": [
/* list of card entity components */
]
},
"prefabName": /* a string */,
"baseId": /* a string */,
"color": /* a string */,
"set": /* a string */,
"rarity": /* an integer */,
"setAndRarity": /* a string */,
"craftingBuy": /* an integer */,
"craftingSell": /* an integer */,
"displayHealth": /* an integer */,
"displayAttack": /* an integer */,
"displaySunCost": /* an integer */,
"faction": /* a string */,
"ignoreDeckLimit": /* true or false */,
"isPower": /* true or false */,
"isPrimaryPower": /* true or false */,
"isFighter": /* true or false */,
"isEnv": /* true or false */,
"isAquatic": /* true or false */,
"isTeamup": /* true or false */,
"subtypes": [
/* list of strings */
],
"tags": [
/* list of strings */
],
"subtype_affinities": [
/* list of strings */
],
"subtype_affinity_weights": [
/* list of numbers */
],
"tag_affinities": [
/* list of strings */
],
"tag_affinity_weights": [
/* list of numbers */
],
"card_affinities": [
/* list of GUIDs */
],
"card_affinity_weights": [
/* list of numbers */
],
"usable": /* true or false */,
"special_abilities": [
/* list of strings */
]
}
</syntaxhighlight>
</tabber>
== Example of card definition ==
Let's take the first card in cards.json - [[pvzwiki:Guacodile (PvZH)|Guacodile]] - for example:
<syntaxhighlight lang="json">
{
"entity": {
"components": [
/* tl;dr */
]
},
"prefabName": "2f9fa005-8b50-4d1a-89be-38e4a82036c4",
"baseId": "Base",
"color": "Guardian",
"set": "Gold",
"rarity": 2,
"setAndRarityKey": "Bloom_SuperRare",
"craftingBuy": 1000,
"craftingSell": 250,
"displayHealth": 3,
"displayAttack": 4,
"displaySunCost": 4,
"faction": "Plants",
"ignoreDeckLimit": false,
"isPower": false,
"isPrimaryPower": false,
"isFighter": true,
"isEnv": false,
"isAquatic": true,
"isTeamup": false,
"subtypes": [
"Fruit",
"Animal"
],
"tags": [
"destroy",
"anyplantfighter",
"anyaquaticplantfighter",
"notpineclone",
"aquatic",
"cost6orless",
"randomplantcard"
],
"subtype_affinities": [],
"subtype_affinity_weights": [],
"tag_affinities": [],
"tag_affinity_weights": [],
"card_affinities": [
8,
462
],
"card_affinity_weights": [
1.2,
1.2
],
"usable": true,
"special_abilities": [
"Unique"
]
}
</syntaxhighlight>
This means: the prefab name of the card is <code class="str">2f9fa005-8b50-4d1a-89be-38e4a82036c4</code>; it is a Plant of Guardian Class; its set and rarity is Premium - Super-Rare; crafting a copy of this card costs 1000 Sparks; recycling a copy of this card returns 250 Sparks; it is a 4-Cost 4/3 non-Superpower Fighter; it is Amphibious; it doesn't have Team-Up; it is of Fruit and Animal subtypes; it is usable during gameplay; it has a Unique ability (its "When destroyed" ability).
== Details ==
=== Card types ===
The <code class="key">baseId</code> field of a card definition object identifies the outward type of the card.
{| class="wikitable"
! Value of <code class="key">baseId</code> !! Card type
|-
| <code class="str">"Base"</code> || Plant
|-
| <code class="str">"BaseZombie"</code> || Zombie
|-
| <code class="str">"BasePlantOneTimeEffect"</code> || Plant Trick
|-
| <code class="str">"BaseZombieOneTimeEffect"</code> || Zombie Trick
|-
| <code class="str">"BasePlantEnvironment"</code> || Plant Environment
|-
| <code class="str">"BaseZombieEnvironment"</code> || Zombie Environment
|}
The <code class="key">isFighter</code> and <code class="key">isEnv</code> fields also indicates the card type.
{| class="wikitable"
! Value of <code class="key">isFighter</code> !! Value of <code class="key">isEnv</code> !! Card type
|-
| <code class="keyword">true</code> || <code class="keyword">false</code> || Plant or Zombie
|-
| <code class="keyword">false</code> || <code class="keyword">false</code> || Trick
|-
| <code class="keyword">false</code> || <code class="keyword">true</code> || Environment
|}
To make a card actual Fighter, Trick or Environment, use neither or either of [[Component/Burst|Burst]] and [[Component/Environment|Environment]] components in the card entity.
=== Classes ===
The <code class="key">baseId</code> field of a card definition object identifies the Class(es) of the card. It decides the background color of the cardface.
{| class="wikitable"
! Value of <code class="key">color</code> !! Class
|-
| <code class="str">"Guardian"</code> || Guardian
|-
| <code class="str">"Kabloom"</code> || Kabloom
|-
| <code class="str">"MegaGro"</code> || Mega-Grow
|-
| <code class="str">"Smarty"</code> || Smarty
|-
| <code class="str">"Solar"</code> || Solar
|-
| <code class="str">"Hungry"</code> || Beastly
|-
| <code class="str">"Brainy"</code> || Brainy
|-
| <code class="str">"Madcap"</code> || Crazy
|-
| <code class="str">"Hearty"</code> || Hearty
|-
| <code class="str">"Sneaky"</code> || Sneaky
|-
| <code class="str">"0"</code> || (No Class)
|}
If a card has two Classes, separate the Class names with a comma. (e.g. <code class="str">"Guardian, Kabloom"</code>, whitespace is optional)
Classes play no role during gameplay. Thus there are no Class components for card entities. They make a difference only when you're building a deck.
=== Sets ===
The <code class="key">set</code> field of a card definition object identifies the set of the card.
{| class="wikitable"
! Value of <code class="key">set</code> !! Set
|-
| <code class="str">"Hero"</code> || Signature Superpower
|-
| <code class="str">"Superpower"</code> || Non-signature Superpower
|-
| <code class="str">"Token"</code> || Token
|-
| <code class="str">"Silver"</code> || Basic
|-
| <code class="str">"Gold"</code> || Premium
|-
| <code class="str">"Set2"</code> || Galactic Garden
|-
| <code class="str">"Set3"</code> || Colossal Fossil
|-
| <code class="str">"Set4"</code> || Triassic Triumph
|-
| <code class="str">"Event"</code> || Event
|-
| <code class="str">""</code> || Removed Superpower
|-
| <code class="str">"Blank"</code> || Blank
|-
| <code class="str">"Cheats"</code> || Cheats
|-
| <code class="str">"Board"</code> || Board Ability
|}
=== Rarities ===
The <code class="key">rarity</code> field of a card definition object identifies the outward rarity of the card. This affects the banner shown at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">rarity</code> !! Rarity
|-
| <code class="num">0</code> || Uncommon
|-
| <code class="num">1</code> || Rare
|-
| <code class="num">2</code> || Super-Rare
|-
| <code class="num">3</code> || Legendary
|-
| <code class="num">4</code> || Common or Token
|-
| <code class="num">5</code> || Event
|}
Use the [[Component/Rarity|Rarity]] component to set the actual rarity used in gameplay.
=== Set-and-rarity keys ===
The <code class="key">setAndRarityKey</code> field of a card definition object identifies the translation key of the card's set and rarity. The localization is shown on the banner at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">setAndRarityKey</code> !! Localization !! Note
|-
| <code class="str">"Superpower_SuperRare"</code> || Super-Rare || For Non-signature Superpowers
|-
| <code class="str">"Dawn_Common"</code> || Basic - Common ||
|-
| <code class="str">"Bloom_Common"</code> || Premium - Uncommon ||
|-
| <code class="str">"Bloom_Rare"</code> || Premium - Rare ||
|-
| <code class="str">"Bloom_SuperRare"</code> || Premium - Super-Rare ||
|-
| <code class="str">"Bloom_Legendary"</code> || Premium - Legendary ||
|-
| <code class="str">"Galactic_Common"</code> || Galactic - Uncommon ||
|-
| <code class="str">"Galactic_Rare"</code> || Galactic - Rare ||
|-
| <code class="str">"Galactic_SuperRare"</code> || Galactic - Super-Rare ||
|-
| <code class="str">"Galactic_Legendary"</code> || Galactic - Legendary ||
|-
| <code class="str">"Colossal_Common"</code> || Colossal - Uncommon ||
|-
| <code class="str">"Colossal_Rare"</code> || Colossal - Rare ||
|-
| <code class="str">"Colossal_SuperRare"</code> || Colossal - Super-Rare ||
|-
| <code class="str">"Colossal_Legendary"</code> || Colossal - Legendary ||
|-
| <code class="str">"Triassic_Common"</code> || Triassic - Uncommon || rowspan=4 | English localizations for these four keys are absent due to unknown reasons.
|-
| <code class="str">"Triassic_Rare"</code> || Triassic - Rare
|-
| <code class="str">"Triassic_SuperRare"</code> || Triassic - Super-Rare
|-
| <code class="str">"Triassic_Legendary"</code> || Triassic - Legendary
|-
| <code class="str">"Token"</code> || Token ||
|-
| <code class="str">"Premium_Event"</code> || Event ||
|-
| <code class="str">""</code> or <code class="keyword">null</code> || || No translation key
|}
=== Factions ===
The <code class="key">faction</code> field of a card definition object identifies the outward faction of the card. Use respective component in the card entity to set the actual faction.
{| class="wikitable"
! Value of <code class="key">faction</code> !! Faction !! Required component
|-
| <code class="str">"Plants"</code> || Plant || [[Component/Plants|Plants]]
|-
| <code class="str">"Zombies"</code> || Zombie || [[Component/Zombies|Zombies]]
|-
| <code class="str">"All"</code> || Board || [[Component/BoardAbility|BoardAbility]]
|}
=== Special abilities ===
The <code class="key">special_abilties</code> list of a card definition object determines the ability icons shown ''on the cardface''.
{| class="wikitable"
! String value !! Ability
|-
| <code class="str">"Ambush"</code> || Anti-Hero
|-
| <code class="str">"Armor"</code> || Armored
|-
| <code class="str">"AttackOverride"</code> || Attack using Health
|-
| <code class="str">"Truestrike"</code> || Bullseye
|-
| <code class="str">"Deadly"</code> || Deadly
|-
| <code class="str">"Repeater"</code> || Double Strike
|-
| <code class="str">"Frenzy"</code> || Frenzy
|-
| <code class="str">"Overshoot"</code> || Overshoot
|-
| <code class="str">"Strikethrough"</code> || Strikethrough
|-
| <code class="str">"Unique"</code> || Unique
|-
| <code class="str">"Untrickable"</code> || Untrickable
|}
If an ability...
* doesn't match any of the abilities listed in the table above (except Unique)
* is not Aquatic, Team-Up nor Gravestone
* is not a "When played", "When revealed" or "While in your hand" ability
Then it matches Unique. The icon for Unique is a golden star below the middle of the Strength and Health icons.
To affect the Strength and Health icons used when the Fighter is ''in play'', use the [[Component/ShowTriggeredIcon|ShowTriggeredIcon]] component in the card entity.
[[Category:Game asset]]
dc0b21285c3ede22e4d2c0f91d02bf994f094f01
Component/Card
0
9
18
2023-12-15T13:23:40Z
HyperNervie
2
Created page with "<syntaxhighlight lang="json"> { "$type": "PvZCards.Engine.Components.Card, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null", "$data": { "Guid": /* a positive integer */ } } </syntaxhighlight> <code class="str">PvZCards.Engine.Components.Card</code> is a [[card entity component]] that identifies the GUID of a card. Each card must have this component in their card entity. == JSON treeview == <div class="treeview"> * <code class="key object"></code><..."
wikitext
text/x-wiki
<syntaxhighlight lang="json">
{
"$type": "PvZCards.Engine.Components.Card, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {
"Guid": /* a positive integer */
}
}
</syntaxhighlight>
<code class="str">PvZCards.Engine.Components.Card</code> is a [[card entity component]] that identifies the GUID of a card. Each card must have this component in their card entity.
== JSON treeview ==
<div class="treeview">
* <code class="key object"></code><code class="key">$data</code> object of the component.
** <code class="key number">Guid</code>: The card's GUID. Must match the key that the card definition object in [[cards.json]] is associated with.
</div>
{{Components}}
[[Category:Card entity component]]
bacec06a7150ff39bab28ee06b0b1f91ce491160
Module:Arguments
828
10
20
19
2023-12-15T14:47:10Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
-- This module provides easy processing of arguments passed to Scribunto from
-- #invoke. It is intended for use by other Lua modules, and should not be
-- called from #invoke directly.
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local arguments = {}
-- Generate four different tidyVal functions, so that we don't have to check the
-- options every time we call it.
local function tidyValDefault(key, val)
if type(val) == 'string' then
val = val:match('^%s*(.-)%s*$')
if val == '' then
return nil
else
return val
end
else
return val
end
end
local function tidyValTrimOnly(key, val)
if type(val) == 'string' then
return val:match('^%s*(.-)%s*$')
else
return val
end
end
local function tidyValRemoveBlanksOnly(key, val)
if type(val) == 'string' then
if val:find('%S') then
return val
else
return nil
end
else
return val
end
end
local function tidyValNoChange(key, val)
return val
end
local function matchesTitle(given, title)
local tp = type( given )
return (tp == 'string' or tp == 'number') and mw.title.new( given ).prefixedText == title
end
local translate_mt = { __index = function(t, k) return k end }
function arguments.getArgs(frame, options)
checkType('getArgs', 1, frame, 'table', true)
checkType('getArgs', 2, options, 'table', true)
frame = frame or {}
options = options or {}
--[[
-- Set up argument translation.
--]]
options.translate = options.translate or {}
if getmetatable(options.translate) == nil then
setmetatable(options.translate, translate_mt)
end
if options.backtranslate == nil then
options.backtranslate = {}
for k,v in pairs(options.translate) do
options.backtranslate[v] = k
end
end
if options.backtranslate and getmetatable(options.backtranslate) == nil then
setmetatable(options.backtranslate, {
__index = function(t, k)
if options.translate[k] ~= k then
return nil
else
return k
end
end
})
end
--[[
-- Get the argument tables. If we were passed a valid frame object, get the
-- frame arguments (fargs) and the parent frame arguments (pargs), depending
-- on the options set and on the parent frame's availability. If we weren't
-- passed a valid frame object, we are being called from another Lua module
-- or from the debug console, so assume that we were passed a table of args
-- directly, and assign it to a new variable (luaArgs).
--]]
local fargs, pargs, luaArgs
if type(frame.args) == 'table' and type(frame.getParent) == 'function' then
if options.wrappers then
--[[
-- The wrappers option makes Module:Arguments look up arguments in
-- either the frame argument table or the parent argument table, but
-- not both. This means that users can use either the #invoke syntax
-- or a wrapper template without the loss of performance associated
-- with looking arguments up in both the frame and the parent frame.
-- Module:Arguments will look up arguments in the parent frame
-- if it finds the parent frame's title in options.wrapper;
-- otherwise it will look up arguments in the frame object passed
-- to getArgs.
--]]
local parent = frame:getParent()
if not parent then
fargs = frame.args
else
local title = parent:getTitle():gsub('/sandbox$', '')
local found = false
if matchesTitle(options.wrappers, title) then
found = true
elseif type(options.wrappers) == 'table' then
for _,v in pairs(options.wrappers) do
if matchesTitle(v, title) then
found = true
break
end
end
end
-- We test for false specifically here so that nil (the default) acts like true.
if found or options.frameOnly == false then
pargs = parent.args
end
if not found or options.parentOnly == false then
fargs = frame.args
end
end
else
-- options.wrapper isn't set, so check the other options.
if not options.parentOnly then
fargs = frame.args
end
if not options.frameOnly then
local parent = frame:getParent()
pargs = parent and parent.args or nil
end
end
if options.parentFirst then
fargs, pargs = pargs, fargs
end
else
luaArgs = frame
end
-- Set the order of precedence of the argument tables. If the variables are
-- nil, nothing will be added to the table, which is how we avoid clashes
-- between the frame/parent args and the Lua args.
local argTables = {fargs}
argTables[#argTables + 1] = pargs
argTables[#argTables + 1] = luaArgs
--[[
-- Generate the tidyVal function. If it has been specified by the user, we
-- use that; if not, we choose one of four functions depending on the
-- options chosen. This is so that we don't have to call the options table
-- every time the function is called.
--]]
local tidyVal = options.valueFunc
if tidyVal then
if type(tidyVal) ~= 'function' then
error(
"bad value assigned to option 'valueFunc'"
.. '(function expected, got '
.. type(tidyVal)
.. ')',
2
)
end
elseif options.trim ~= false then
if options.removeBlanks ~= false then
tidyVal = tidyValDefault
else
tidyVal = tidyValTrimOnly
end
else
if options.removeBlanks ~= false then
tidyVal = tidyValRemoveBlanksOnly
else
tidyVal = tidyValNoChange
end
end
--[[
-- Set up the args, metaArgs and nilArgs tables. args will be the one
-- accessed from functions, and metaArgs will hold the actual arguments. Nil
-- arguments are memoized in nilArgs, and the metatable connects all of them
-- together.
--]]
local args, metaArgs, nilArgs, metatable = {}, {}, {}, {}
setmetatable(args, metatable)
local function mergeArgs(tables)
--[[
-- Accepts multiple tables as input and merges their keys and values
-- into one table. If a value is already present it is not overwritten;
-- tables listed earlier have precedence. We are also memoizing nil
-- values, which can be overwritten if they are 's' (soft).
--]]
for _, t in ipairs(tables) do
for key, val in pairs(t) do
if metaArgs[key] == nil and nilArgs[key] ~= 'h' then
local tidiedVal = tidyVal(key, val)
if tidiedVal == nil then
nilArgs[key] = 's'
else
metaArgs[key] = tidiedVal
end
end
end
end
end
--[[
-- Define metatable behaviour. Arguments are memoized in the metaArgs table,
-- and are only fetched from the argument tables once. Fetching arguments
-- from the argument tables is the most resource-intensive step in this
-- module, so we try and avoid it where possible. For this reason, nil
-- arguments are also memoized, in the nilArgs table. Also, we keep a record
-- in the metatable of when pairs and ipairs have been called, so we do not
-- run pairs and ipairs on the argument tables more than once. We also do
-- not run ipairs on fargs and pargs if pairs has already been run, as all
-- the arguments will already have been copied over.
--]]
metatable.__index = function (t, key)
--[[
-- Fetches an argument when the args table is indexed. First we check
-- to see if the value is memoized, and if not we try and fetch it from
-- the argument tables. When we check memoization, we need to check
-- metaArgs before nilArgs, as both can be non-nil at the same time.
-- If the argument is not present in metaArgs, we also check whether
-- pairs has been run yet. If pairs has already been run, we return nil.
-- This is because all the arguments will have already been copied into
-- metaArgs by the mergeArgs function, meaning that any other arguments
-- must be nil.
--]]
if type(key) == 'string' then
key = options.translate[key]
end
local val = metaArgs[key]
if val ~= nil then
return val
elseif metatable.donePairs or nilArgs[key] then
return nil
end
for _, argTable in ipairs(argTables) do
local argTableVal = tidyVal(key, argTable[key])
if argTableVal ~= nil then
metaArgs[key] = argTableVal
return argTableVal
end
end
nilArgs[key] = 'h'
return nil
end
metatable.__newindex = function (t, key, val)
-- This function is called when a module tries to add a new value to the
-- args table, or tries to change an existing value.
if type(key) == 'string' then
key = options.translate[key]
end
if options.readOnly then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; the table is read-only',
2
)
elseif options.noOverwrite and args[key] ~= nil then
error(
'could not write to argument table key "'
.. tostring(key)
.. '"; overwriting existing arguments is not permitted',
2
)
elseif val == nil then
--[[
-- If the argument is to be overwritten with nil, we need to erase
-- the value in metaArgs, so that __index, __pairs and __ipairs do
-- not use a previous existing value, if present; and we also need
-- to memoize the nil in nilArgs, so that the value isn't looked
-- up in the argument tables if it is accessed again.
--]]
metaArgs[key] = nil
nilArgs[key] = 'h'
else
metaArgs[key] = val
end
end
local function translatenext(invariant)
local k, v = next(invariant.t, invariant.k)
invariant.k = k
if k == nil then
return nil
elseif type(k) ~= 'string' or not options.backtranslate then
return k, v
else
local backtranslate = options.backtranslate[k]
if backtranslate == nil then
-- Skip this one. This is a tail call, so this won't cause stack overflow
return translatenext(invariant)
else
return backtranslate, v
end
end
end
metatable.__pairs = function ()
-- Called when pairs is run on the args table.
if not metatable.donePairs then
mergeArgs(argTables)
metatable.donePairs = true
end
return translatenext, { t = metaArgs }
end
local function inext(t, i)
-- This uses our __index metamethod
local v = t[i + 1]
if v ~= nil then
return i + 1, v
end
end
metatable.__ipairs = function (t)
-- Called when ipairs is run on the args table.
return inext, t, 0
end
return args
end
return arguments
3134ecce8429b810d445e29eae115e2ae4c36c53
Module:Documentation
828
12
22
21
2023-12-15T14:47:12Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
-- This module implements {{documentation}}.
-- Get required modules.
local getArgs = require('Module:Arguments').getArgs
local messageBox = require('Module:Message box')
-- Get the config table.
local cfg = mw.loadData('Module:Documentation/config')
local i18n = mw.loadData('Module:Documentation/i18n')
local p = {}
-- Often-used functions.
local ugsub = mw.ustring.gsub
----------------------------------------------------------------------------
-- Helper functions
--
-- These are defined as local functions, but are made available in the p
-- table for testing purposes.
----------------------------------------------------------------------------
local function message(cfgKey, valArray, expectType)
--[[
-- Gets a message from the cfg table and formats it if appropriate.
-- The function raises an error if the value from the cfg table is not
-- of the type expectType. The default type for expectType is 'string'.
-- If the table valArray is present, strings such as $1, $2 etc. in the
-- message are substituted with values from the table keys [1], [2] etc.
-- For example, if the message "foo-message" had the value 'Foo $2 bar $1.',
-- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz."
--]]
local msg = cfg[cfgKey]
expectType = expectType or 'string'
if type(msg) ~= expectType then
error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-type', cfgKey, expectType, type(msg)), 2)
end
if not valArray then
return msg
end
local function getMessageVal(match)
match = tonumber(match)
return valArray[match] or error(require('Module:TNT').format('I18n/Documentation', 'cfg-error-msg-empty', '$' .. match, cfgKey), 4)
end
local ret = ugsub(msg, '$([1-9][0-9]*)', getMessageVal)
return ret
end
p.message = message
local function makeWikilink(page, display)
if display then
return mw.ustring.format('[[%s|%s]]', page, display)
else
return mw.ustring.format('[[%s]]', page)
end
end
p.makeWikilink = makeWikilink
local function makeCategoryLink(cat, sort)
local catns = mw.site.namespaces[14].name
return makeWikilink(catns .. ':' .. cat, sort)
end
p.makeCategoryLink = makeCategoryLink
local function makeUrlLink(url, display)
return mw.ustring.format('[%s %s]', url, display)
end
p.makeUrlLink = makeUrlLink
local function makeToolbar(...)
local ret = {}
local lim = select('#', ...)
if lim < 1 then
return nil
end
for i = 1, lim do
ret[#ret + 1] = select(i, ...)
end
return '<small style="font-style: normal;">(' .. table.concat(ret, ' | ') .. ')</small>'
end
p.makeToolbar = makeToolbar
----------------------------------------------------------------------------
-- Argument processing
----------------------------------------------------------------------------
local function makeInvokeFunc(funcName)
return function (frame)
local args = getArgs(frame, {
valueFunc = function (key, value)
if type(value) == 'string' then
value = value:match('^%s*(.-)%s*$') -- Remove whitespace.
if key == 'heading' or value ~= '' then
return value
else
return nil
end
else
return value
end
end
})
return p[funcName](args)
end
end
----------------------------------------------------------------------------
-- Load TemplateStyles
----------------------------------------------------------------------------
p.main = function(frame)
local parent = frame.getParent(frame)
local output = p._main(parent.args)
return frame:extensionTag{ name='templatestyles', args = { src= message('templatestyles-scr') } } .. output
end
----------------------------------------------------------------------------
-- Main function
----------------------------------------------------------------------------
function p._main(args)
--[[
-- This function defines logic flow for the module.
-- @args - table of arguments passed by the user
--
-- Messages:
-- 'main-div-id' --> 'template-documentation'
-- 'main-div-classes' --> 'template-documentation iezoomfix'
--]]
local env = p.getEnvironment(args)
local root = mw.html.create()
root
:wikitext(p._getModuleWikitext(args, env))
:wikitext(p.protectionTemplate(env))
:wikitext(p.sandboxNotice(args, env))
-- This div tag is from {{documentation/start box}}, but moving it here
-- so that we don't have to worry about unclosed tags.
:tag('div')
:attr('id', message('main-div-id'))
:addClass(message('main-div-class'))
:wikitext(p._startBox(args, env))
:wikitext(p._content(args, env))
:done()
:wikitext(p._endBox(args, env))
:wikitext(p.addTrackingCategories(env))
return tostring(root)
end
----------------------------------------------------------------------------
-- Environment settings
----------------------------------------------------------------------------
function p.getEnvironment(args)
--[[
-- Returns a table with information about the environment, including title objects and other namespace- or
-- path-related data.
-- @args - table of arguments passed by the user
--
-- Title objects include:
-- env.title - the page we are making documentation for (usually the current title)
-- env.templateTitle - the template (or module, file, etc.)
-- env.docTitle - the /doc subpage.
-- env.sandboxTitle - the /sandbox subpage.
-- env.testcasesTitle - the /testcases subpage.
-- env.printTitle - the print version of the template, located at the /Print subpage.
--
-- Data includes:
-- env.protectionLevels - the protection levels table of the title object.
-- env.subjectSpace - the number of the title's subject namespace.
-- env.docSpace - the number of the namespace the title puts its documentation in.
-- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace.
-- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template.
--
-- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value
-- returned will be nil.
--]]
local env, envFuncs = {}, {}
-- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value
-- returned by that function is memoized in the env table so that we don't call any of the functions
-- more than once. (Nils won't be memoized.)
setmetatable(env, {
__index = function (t, key)
local envFunc = envFuncs[key]
if envFunc then
local success, val = pcall(envFunc)
if success then
env[key] = val -- Memoise the value.
return val
end
end
return nil
end
})
function envFuncs.title()
-- The title object for the current page, or a test page passed with args.page.
local title
local titleArg = args.page
if titleArg then
title = mw.title.new(titleArg)
else
title = mw.title.getCurrentTitle()
end
return title
end
function envFuncs.templateTitle()
--[[
-- The template (or module, etc.) title object.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
-- 'testcases-subpage' --> 'testcases'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local subpage = title.subpageText
if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') then
return mw.title.makeTitle(subjectSpace, title.baseText)
else
return mw.title.makeTitle(subjectSpace, title.text)
end
end
function envFuncs.docTitle()
--[[
-- Title object of the /doc subpage.
-- Messages:
-- 'doc-subpage' --> 'doc'
--]]
local title = env.title
local docname = args[1] -- User-specified doc page.
local docpage
if docname then
docpage = docname
else
docpage = env.docpageBase .. '/' .. message('doc-subpage')
end
return mw.title.new(docpage)
end
function envFuncs.sandboxTitle()
--[[
-- Title object for the /sandbox subpage.
-- Messages:
-- 'sandbox-subpage' --> 'sandbox'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage'))
end
function envFuncs.testcasesTitle()
--[[
-- Title object for the /testcases subpage.
-- Messages:
-- 'testcases-subpage' --> 'testcases'
--]]
return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage'))
end
function envFuncs.printTitle()
--[[
-- Title object for the /Print subpage.
-- Messages:
-- 'print-subpage' --> 'Print'
--]]
return env.templateTitle:subPageTitle(message('print-subpage'))
end
function envFuncs.protectionLevels()
-- The protection levels table of the title object.
return env.title.protectionLevels
end
function envFuncs.subjectSpace()
-- The subject namespace number.
return mw.site.namespaces[env.title.namespace].subject.id
end
function envFuncs.docSpace()
-- The documentation namespace number. For most namespaces this is the same as the
-- subject namespace. However, pages in the Article, File, MediaWiki or Category
-- namespaces must have their /doc, /sandbox and /testcases pages in talk space.
local subjectSpace = env.subjectSpace
if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then
return subjectSpace + 1
else
return subjectSpace
end
end
function envFuncs.docpageBase()
-- The base page of the /doc, /sandbox, and /testcases subpages.
-- For some namespaces this is the talk page, rather than the template page.
local templateTitle = env.templateTitle
local docSpace = env.docSpace
local docSpaceText = mw.site.namespaces[docSpace].name
-- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon.
return docSpaceText .. ':' .. templateTitle.text
end
function envFuncs.compareUrl()
-- Diff link between the sandbox and the main template using [[Special:ComparePages]].
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
if templateTitle.exists and sandboxTitle.exists then
local compareUrl = mw.uri.fullUrl(
'Special:ComparePages',
{page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText}
)
return tostring(compareUrl)
else
return nil
end
end
return env
end
----------------------------------------------------------------------------
-- Auxiliary templates
----------------------------------------------------------------------------
p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext')
function p._getModuleWikitext(args, env)
local currentTitle = mw.title.getCurrentTitle()
if currentTitle.contentModel ~= 'Scribunto' then return end
pcall(require, currentTitle.prefixedText) -- if it fails, we don't care
local moduleWikitext = package.loaded["Module:Module wikitext"]
if moduleWikitext then
return moduleWikitext.main()
end
end
function p.sandboxNotice(args, env)
--[=[
-- Generates a sandbox notice for display above sandbox pages.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-notice-image' --> '[[Image:Sandbox.svg|50px|alt=|link=]]'
-- 'sandbox-notice-blurb' --> 'This is the $1 for $2.'
-- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).'
-- 'sandbox-notice-pagetype-template' --> '[[w:Wikipedia:Template test cases|template sandbox]] page'
-- 'sandbox-notice-pagetype-module' --> '[[w:Wikipedia:Template test cases|module sandbox]] page'
-- 'sandbox-notice-pagetype-other' --> 'sandbox page'
-- 'sandbox-notice-compare-link-display' --> 'diff'
-- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.'
-- 'sandbox-notice-testcases-link-display' --> 'test cases'
-- 'sandbox-category' --> 'Template sandboxes'
--]=]
local title = env.title
local sandboxTitle = env.sandboxTitle
local templateTitle = env.templateTitle
local subjectSpace = env.subjectSpace
if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then
return nil
end
-- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text".
local omargs = {}
omargs.image = message('sandbox-notice-image')
-- Get the text. We start with the opening blurb, which is something like
-- "This is the template sandbox for [[Template:Foo]] (diff)."
local text = ''
local frame = mw.getCurrentFrame()
local isPreviewing = frame:preprocess('{{REVISIONID}}') == '' -- True if the page is being previewed.
local pagetype
if subjectSpace == 10 then
pagetype = message('sandbox-notice-pagetype-template')
elseif subjectSpace == 828 then
pagetype = message('sandbox-notice-pagetype-module')
else
pagetype = message('sandbox-notice-pagetype-other')
end
local templateLink = makeWikilink(templateTitle.prefixedText)
local compareUrl = env.compareUrl
if isPreviewing or not compareUrl then
text = text .. message('sandbox-notice-blurb', {pagetype, templateLink})
else
local compareDisplay = message('sandbox-notice-compare-link-display')
local compareLink = makeUrlLink(compareUrl, compareDisplay)
text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink})
end
-- Get the test cases page blurb if the page exists. This is something like
-- "See also the companion subpage for [[Template:Foo/testcases|test cases]]."
local testcasesTitle = env.testcasesTitle
if testcasesTitle and testcasesTitle.exists then
if testcasesTitle.contentModel == "Scribunto" then
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink})
else
local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display')
local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay)
text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink})
end
end
-- Add the sandbox to the sandbox category.
text = text .. makeCategoryLink(message('sandbox-category'))
omargs.text = text
omargs.class = message('sandbox-class')
local ret = '<div style="clear: both;"></div>'
ret = ret .. messageBox.main('ombox', omargs)
return ret
end
function p.protectionTemplate(env)
-- Generates the padlock icon in the top right.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'protection-template' --> 'pp-template'
-- 'protection-template-args' --> {docusage = 'yes'}
local title = env.title
local protectionLevels
local protectionTemplate = message('protection-template')
local namespace = title.namespace
if not (protectionTemplate and (namespace == 10 or namespace == 828)) then
-- Don't display the protection template if we are not in the template or module namespaces.
return nil
end
protectionLevels = env.protectionLevels
if not protectionLevels then
return nil
end
local editLevels = protectionLevels.edit
local moveLevels = protectionLevels.move
if moveLevels and moveLevels[1] == 'sysop' or editLevels and editLevels[1] then
-- The page is full-move protected, or full, template, or semi-protected.
local frame = mw.getCurrentFrame()
return frame:expandTemplate{title = protectionTemplate, args = message('protection-template-args', nil, 'table')}
else
return nil
end
end
----------------------------------------------------------------------------
-- Start box
----------------------------------------------------------------------------
p.startBox = makeInvokeFunc('_startBox')
function p._startBox(args, env)
--[[
-- This function generates the start box.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make
-- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox
-- which generate the box HTML.
--]]
env = env or p.getEnvironment(args)
local links
local content = args.content
if not content then
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if linksData then
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if data then
return p.renderStartBox(data)
else
-- User specified no heading.
return nil
end
end
function p.makeStartBoxLinksData(args, env)
--[[
-- Does initial processing of data to make the [view] [edit] [history] [purge] links.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'view-link-display' --> 'view'
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'purge-link-display' --> 'purge'
-- 'file-docpage-preload' --> 'Template:Documentation/preload-filespace'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'docpage-preload' --> 'Template:Documentation/preload'
-- 'create-link-display' --> 'create'
--]]
local subjectSpace = env.subjectSpace
local title = env.title
local docTitle = env.docTitle
if not title or not docTitle then
return nil
end
if docTitle.isRedirect then
docTitle = docTitle.redirectTarget
end
local data = {}
data.title = title
data.docTitle = docTitle
-- View, display, edit, and purge links if /doc exists.
data.viewLinkDisplay = i18n['view-link-display']
data.editLinkDisplay = i18n['edit-link-display']
data.historyLinkDisplay = i18n['history-link-display']
data.purgeLinkDisplay = i18n['purge-link-display']
-- Create link if /doc doesn't exist.
local preload = args.preload
if not preload then
if subjectSpace == 6 then -- File namespace
preload = message('file-docpage-preload')
elseif subjectSpace == 828 then -- Module namespace
preload = message('module-preload')
else
preload = message('docpage-preload')
end
end
data.preload = preload
data.createLinkDisplay = i18n['create-link-display']
return data
end
function p.renderStartBoxLinks(data)
--[[
-- Generates the [view][edit][history][purge] or [create] links from the data table.
-- @data - a table of data generated by p.makeStartBoxLinksData
--]]
local function escapeBrackets(s)
-- Escapes square brackets with HTML entities.
s = s:gsub('%[', '[') -- Replace square brackets with HTML entities.
s = s:gsub('%]', ']')
return s
end
local ret
local docTitle = data.docTitle
local title = data.title
if docTitle.exists then
local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay)
local editLink = makeUrlLink(docTitle:fullUrl{action = 'edit'}, data.editLinkDisplay)
local historyLink = makeUrlLink(docTitle:fullUrl{action = 'history'}, data.historyLinkDisplay)
local purgeLink = makeUrlLink(title:fullUrl{action = 'purge'}, data.purgeLinkDisplay)
ret = '[%s] [%s] [%s] [%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, viewLink, editLink, historyLink, purgeLink)
else
local createLink = makeUrlLink(docTitle:fullUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay)
ret = '[%s]'
ret = escapeBrackets(ret)
ret = mw.ustring.format(ret, createLink)
end
return ret
end
function p.makeStartBoxData(args, env, links)
--[=[
-- Does initial processing of data to pass to the start-box render function, p.renderStartBox.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error.
--
-- Messages:
-- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=Documentation icon]]'
-- 'template-namespace-heading' --> 'Template documentation'
-- 'module-namespace-heading' --> 'Module documentation'
-- 'file-namespace-heading' --> 'Summary'
-- 'other-namespaces-heading' --> 'Documentation'
-- 'start-box-linkclasses' --> 'mw-editsection-like plainlinks'
-- 'start-box-link-id' --> 'doc_editlinks'
-- 'testcases-create-link-display' --> 'create'
--]=]
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
-- if an error occurs.
subjectSpace = 2
end
local data = {}
-- Heading
local heading = args.heading -- Blank values are not removed.
if heading == '' then
-- Don't display the start box if the heading arg is defined but blank.
return nil
end
if heading then
data.heading = heading
elseif subjectSpace == 10 then -- Template namespace
data.heading = i18n['template-namespace-heading']
elseif subjectSpace == 828 then -- Module namespace
data.heading = i18n['module-namespace-heading']
elseif subjectSpace == 6 then -- File namespace
data.heading = i18n['file-namespace-heading']
else
data.heading = i18n['other-namespaces-heading']
end
-- Data for the [view][edit][history][purge] or [create] links.
if links then
data.linksClass = message('start-box-linkclasses')
data.linksId = message('start-box-link-id')
data.links = links
end
return data
end
function p.renderStartBox(data)
-- Renders the start box html.
-- @data - a table of data generated by p.makeStartBoxData.
local sbox = mw.html.create('div')
sbox
:addClass(message('header-div-class'))
:tag('div')
:addClass(message('heading-div-class'))
:wikitext(data.heading)
local links = data.links
if links then
sbox
:tag('div')
:addClass(data.linksClass)
:attr('id', data.linksId)
:wikitext(links)
end
return tostring(sbox)
end
----------------------------------------------------------------------------
-- Documentation content
----------------------------------------------------------------------------
p.content = makeInvokeFunc('_content')
function p._content(args, env)
-- Displays the documentation contents
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
local content = args.content
if not content and docTitle and docTitle.exists then
content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle}
end
-- The line breaks below are necessary so that "=== Headings ===" at the start and end
-- of docs are interpreted correctly.
local cbox = mw.html.create('div')
cbox
:addClass(message('content-div-class'))
:wikitext('\n' .. (content or '') .. '\n')
return tostring(cbox)
end
p.contentTitle = makeInvokeFunc('_contentTitle')
function p._contentTitle(args, env)
env = env or p.getEnvironment(args)
local docTitle = env.docTitle
if not args.content and docTitle and docTitle.exists then
return docTitle.prefixedText
else
return ''
end
end
----------------------------------------------------------------------------
-- End box
----------------------------------------------------------------------------
p.endBox = makeInvokeFunc('_endBox')
function p._endBox(args, env)
--[=[
-- This function generates the end box (also known as the link box).
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--]=]
-- Get environment data.
env = env or p.getEnvironment(args)
local subjectSpace = env.subjectSpace
local docTitle = env.docTitle
if not subjectSpace or not docTitle then
return nil
end
-- Check whether we should output the end box at all. Add the end
-- box by default if the documentation exists or if we are in the
-- user, module or template namespaces.
local linkBox = args['link box']
if linkBox == 'off'
or not (
docTitle.exists
or subjectSpace == 2
or subjectSpace == 828
or subjectSpace == 10
)
then
return nil
end
-- Assemble the footer text field.
local text = ''
if linkBox then
text = text .. linkBox
else
text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]."
if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then
-- We are in the user, template or module namespaces.
-- Add sandbox and testcases links.
-- "Editors can experiment in this template's sandbox and testcases pages."
text = text .. (p.makeExperimentBlurb(args, env) or '')
text = text .. '<br />'
if not args.content and not args[1] then
-- "Please add categories to the /doc subpage."
-- Don't show this message with inline docs or with an explicitly specified doc page,
-- as then it is unclear where to add the categories.
text = text .. (p.makeCategoriesBlurb(args, env) or '')
end
text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template"
local printBlurb = p.makePrintBlurb(args, env) -- Two-line blurb about print versions of templates.
if printBlurb then
text = text .. '<br />' .. printBlurb
end
end
end
local ebox = mw.html.create('div')
ebox
:addClass(message('footer-div-class'))
:wikitext(text)
return tostring(ebox)
end
function p.makeDocPageBlurb(args, env)
--[=[
-- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)".
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'edit-link-display' --> 'edit'
-- 'history-link-display' --> 'history'
-- 'transcluded-from-blurb' -->
-- 'The above [[w:Wikipedia:Template documentation|documentation]]
-- is [[w:Wikipedia:Transclusion|transcluded]] from $1.'
-- 'module-preload' --> 'Template:Documentation/preload-module-doc'
-- 'create-link-display' --> 'create'
-- 'create-module-doc-blurb' -->
-- 'You might want to $1 a documentation page for this [[w:Wikipedia:Lua|Scribunto module]].'
--]=]
local docTitle = env.docTitle
if not docTitle or args.content then
return nil
end
local ret
if docTitle.exists then
-- /doc exists; link to it.
local docLink = makeWikilink(docTitle.prefixedText)
local editUrl = docTitle:fullUrl{action = 'edit'}
local editDisplay = i18n['edit-link-display']
local editLink = makeUrlLink(editUrl, editDisplay)
local historyUrl = docTitle:fullUrl{action = 'history'}
local historyDisplay = i18n['history-link-display']
local historyLink = makeUrlLink(historyUrl, historyDisplay)
ret = message('transcluded-from-blurb', {docLink})
.. ' '
.. makeToolbar(editLink, historyLink)
.. '<br />'
elseif env.subjectSpace == 828 then
-- /doc does not exist; ask to create it.
local createUrl = docTitle:fullUrl{action = 'edit', preload = message('module-preload')}
local createDisplay = i18n['create-link-display']
local createLink = makeUrlLink(createUrl, createDisplay)
ret = message('create-module-doc-blurb', {createLink})
.. '<br />'
end
return ret
end
function p.makeExperimentBlurb(args, env)
--[[
-- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'sandbox-link-display' --> 'sandbox'
-- 'sandbox-edit-link-display' --> 'edit'
-- 'compare-link-display' --> 'diff'
-- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'sandbox-create-link-display' --> 'create'
-- 'mirror-edit-summary' --> 'Create sandbox version of $1'
-- 'mirror-link-display' --> 'mirror'
-- 'mirror-link-preload' --> 'Template:Documentation/mirror'
-- 'sandbox-link-display' --> 'sandbox'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display'--> 'edit'
-- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox'
-- 'testcases-create-link-display' --> 'create'
-- 'testcases-link-display' --> 'testcases'
-- 'testcases-edit-link-display' --> 'edit'
-- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases'
-- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases'
-- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.'
-- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
local sandboxTitle = env.sandboxTitle
local testcasesTitle = env.testcasesTitle
local templatePage = templateTitle.prefixedText
if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then
return nil
end
-- Make links.
local sandboxLinks, testcasesLinks
if sandboxTitle.exists then
local sandboxPage = sandboxTitle.prefixedText
local sandboxDisplay = message('sandbox-link-display')
local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay)
local sandboxEditUrl = sandboxTitle:fullUrl{action = 'edit'}
local sandboxEditDisplay = message('sandbox-edit-link-display')
local sandboxEditLink = makeUrlLink(sandboxEditUrl, sandboxEditDisplay)
local compareUrl = env.compareUrl
local compareLink
if compareUrl then
local compareDisplay = message('compare-link-display')
compareLink = makeUrlLink(compareUrl, compareDisplay)
end
sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink)
else
local sandboxPreload
if subjectSpace == 828 then
sandboxPreload = message('module-sandbox-preload')
else
sandboxPreload = message('template-sandbox-preload')
end
local sandboxCreateUrl = sandboxTitle:fullUrl{action = 'edit', preload = sandboxPreload}
local sandboxCreateDisplay = message('sandbox-create-link-display')
local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay)
local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)})
local mirrorPreload = message('mirror-link-preload')
local mirrorUrl = sandboxTitle:fullUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary}
local mirrorDisplay = message('mirror-link-display')
local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay)
sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink)
end
if testcasesTitle.exists then
local testcasesPage = testcasesTitle.prefixedText
local testcasesDisplay = message('testcases-link-display')
local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay)
local testcasesEditUrl = testcasesTitle:fullUrl{action = 'edit'}
local testcasesEditDisplay = message('testcases-edit-link-display')
local testcasesEditLink = makeUrlLink(testcasesEditUrl, testcasesEditDisplay)
testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink)
else
local testcasesPreload
if subjectSpace == 828 then
testcasesPreload = message('module-testcases-preload')
else
testcasesPreload = message('template-testcases-preload')
end
local testcasesCreateUrl = testcasesTitle:fullUrl{action = 'edit', preload = testcasesPreload}
local testcasesCreateDisplay = message('testcases-create-link-display')
local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay)
testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink)
end
local messageName
if subjectSpace == 828 then
messageName = 'experiment-blurb-module'
else
messageName = 'experiment-blurb-template'
end
return message(messageName, {sandboxLinks, testcasesLinks})
end
function p.makeCategoriesBlurb(args, env)
--[[
-- Generates the text "Please add categories to the /doc subpage."
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'doc-link-display' --> '/doc'
-- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.'
--]]
local docTitle = env.docTitle
if not docTitle then
return nil
end
local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display'))
return message('add-categories-blurb', {docPathLink})
end
function p.makeSubpagesBlurb(args, env)
--[[
-- Generates the "Subpages of this template" link.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'template-pagetype' --> 'template'
-- 'module-pagetype' --> 'module'
-- 'default-pagetype' --> 'page'
-- 'subpages-link-display' --> 'Subpages of this $1'
--]]
local subjectSpace = env.subjectSpace
local templateTitle = env.templateTitle
if not subjectSpace or not templateTitle then
return nil
end
local pagetype
if subjectSpace == 10 then
pagetype = message('template-pagetype')
elseif subjectSpace == 828 then
pagetype = message('module-pagetype')
else
pagetype = message('default-pagetype')
end
local subpagesLink = makeWikilink(
'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/',
message('subpages-link-display', {pagetype})
)
return message('subpages-blurb', {subpagesLink})
end
function p.makePrintBlurb(args, env)
--[=[
-- Generates the blurb displayed when there is a print version of the template available.
-- @args - a table of arguments passed by the user
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
--
-- Messages:
-- 'print-link-display' --> '/Print'
-- 'print-blurb' --> 'A [[Help:Books/for experts#Improving the book layout|print version]]'
-- .. ' of this template exists at $1.'
-- .. ' If you make a change to this template, please update the print version as well.'
-- 'display-print-category' --> true
-- 'print-category' --> 'Templates with print versions'
--]=]
local printTitle = env.printTitle
if not printTitle then
return nil
end
local ret
if printTitle.exists then
local printLink = makeWikilink(printTitle.prefixedText, message('print-link-display'))
ret = message('print-blurb', {printLink})
local displayPrintCategory = message('display-print-category', nil, 'boolean')
if displayPrintCategory then
ret = ret .. makeCategoryLink(message('print-category'))
end
end
return ret
end
----------------------------------------------------------------------------
-- Tracking categories
----------------------------------------------------------------------------
function p.addTrackingCategories(env)
--[[
-- Check if {{documentation}} is transcluded on a /doc or /testcases page.
-- @env - environment table containing title objects, etc., generated with p.getEnvironment
-- Messages:
-- 'display-strange-usage-category' --> true
-- 'doc-subpage' --> 'doc'
-- 'testcases-subpage' --> 'testcases'
-- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage'
--
-- /testcases pages in the module namespace are not categorised, as they may have
-- {{documentation}} transcluded automatically.
--]]
local title = env.title
local subjectSpace = env.subjectSpace
if not title or not subjectSpace then
return nil
end
local subpage = title.subpageText
local ret = ''
if message('display-strange-usage-category', nil, 'boolean')
and (
subpage == message('doc-subpage')
or subjectSpace ~= 828 and subpage == message('testcases-subpage')
)
then
ret = ret .. makeCategoryLink(message('strange-usage-category'))
end
return ret
end
return p
0e23eec0d3c20c23afcd28849e240b9083dbcf88
Module:Documentation/config
828
13
24
23
2023-12-15T14:47:13Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
----------------------------------------------------------------------------------------------------
--
-- Configuration for Module:Documentation
--
-- Here you can set the values of the parameters and messages used in Module:Documentation to
-- localise it to your wiki and your language. Unless specified otherwise, values given here
-- should be string values.
----------------------------------------------------------------------------------------------------
local _format = require('Module:TNT').format
local function format(id)
return _format('I18n/Documentation', id)
end
local cfg = {} -- Do not edit this line.
cfg['templatestyles-scr'] = 'Module:Documentation/styles.css'
----------------------------------------------------------------------------------------------------
-- Protection template configuration
----------------------------------------------------------------------------------------------------
-- cfg['protection-template']
-- The name of the template that displays the protection icon (a padlock on enwiki).
cfg['protection-template'] = 'pp-template'
-- cfg['protection-reason-edit']
-- The protection reason for edit-protected templates to pass to
-- [[Module:Protection banner]].
cfg['protection-reason-edit'] = 'template'
--[[
-- cfg['protection-template-args']
-- Any arguments to send to the protection template. This should be a Lua table.
-- For example, if the protection template is "pp-template", and the wikitext template invocation
-- looks like "{{pp-template|docusage=yes}}", then this table should look like "{docusage = 'yes'}".
--]]
cfg['protection-template-args'] = {docusage = 'yes'}
--[[
----------------------------------------------------------------------------------------------------
-- Sandbox notice configuration
--
-- On sandbox pages the module can display a template notifying users that the current page is a
-- sandbox, and the location of test cases pages, etc. The module decides whether the page is a
-- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the
-- messages that the notices contains.
----------------------------------------------------------------------------------------------------
--]]
-- cfg['sandbox-notice-image']
-- The image displayed in the sandbox notice.
cfg['sandbox-notice-image'] = '[[Image:Edit In Sandbox Icon - Color.svg|40px|alt=|link=]]'
--[[
-- cfg['sandbox-notice-pagetype-template']
-- cfg['sandbox-notice-pagetype-module']
-- cfg['sandbox-notice-pagetype-other']
-- The page type of the sandbox page. The message that is displayed depends on the current subject
-- namespace. This message is used in either cfg['sandbox-notice-blurb'] or
-- cfg['sandbox-notice-diff-blurb'].
--]]
cfg['sandbox-notice-pagetype-template'] = format('sandbox-notice-pagetype-template')
cfg['sandbox-notice-pagetype-module'] = format('sandbox-notice-pagetype-module')
cfg['sandbox-notice-pagetype-other'] = format('sandbox-notice-pagetype-other')
--[[
-- cfg['sandbox-notice-blurb']
-- cfg['sandbox-notice-diff-blurb']
-- cfg['sandbox-notice-diff-display']
-- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence
-- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page
-- type, which is either cfg['sandbox-notice-pagetype-template'],
-- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what
-- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between
-- the sandbox and the main template. The display value of the diff link is set by
-- cfg['sandbox-notice-compare-link-display'].
--]]
cfg['sandbox-notice-blurb'] = format('sandbox-notice-blurb')
cfg['sandbox-notice-diff-blurb'] = format('sandbox-notice-diff-blurb')
cfg['sandbox-notice-compare-link-display'] = format('sandbox-notice-compare-link-display')
--[[
-- cfg['sandbox-notice-testcases-blurb']
-- cfg['sandbox-notice-testcases-link-display']
-- cfg['sandbox-notice-testcases-run-blurb']
-- cfg['sandbox-notice-testcases-run-link-display']
-- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit. $1 is a link to the test cases page.
-- cfg['sandbox-notice-testcases-link-display'] is the display value for that link.
-- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page
-- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test
-- cases page, and $2 is a link to the page to run it.
-- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test
-- cases.
--]]
cfg['sandbox-notice-testcases-blurb'] = format('sandbox-notice-testcases-blurb')
cfg['sandbox-notice-testcases-link-display'] = format('sandbox-notice-testcases-link-display')
cfg['sandbox-notice-testcases-run-blurb'] = format('sandbox-notice-testcases-run-blurb')
cfg['sandbox-notice-testcases-run-link-display'] = format('sandbox-notice-testcases-run-link-display')
-- cfg['sandbox-category']
-- A category to add to all template sandboxes.
cfg['sandbox-category'] = 'Template sandboxes'
----------------------------------------------------------------------------------------------------
-- Start box configuration
----------------------------------------------------------------------------------------------------
-- cfg['documentation-icon-wikitext']
-- The wikitext for the icon shown at the top of the template.
cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=Documentation icon]]'
----------------------------------------------------------------------------------------------------
-- Link box (end box) configuration
----------------------------------------------------------------------------------------------------
-- cfg['transcluded-from-blurb']
-- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page.
cfg['transcluded-from-blurb'] = format('transcluded-from-blurb')
--[[
-- cfg['create-module-doc-blurb']
-- Notice displayed in the module namespace when the documentation subpage does not exist.
-- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the
-- display cfg['create-link-display'].
--]]
cfg['create-module-doc-blurb'] = format('create-module-doc-blurb')
----------------------------------------------------------------------------------------------------
-- Experiment blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['experiment-blurb-template']
-- cfg['experiment-blurb-module']
-- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages.
-- It is only shown in the template and module namespaces. With the default English settings, it
-- might look like this:
--
-- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
--
-- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links.
--
-- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending
-- on what namespace we are in.
--
-- Parameters:
--
-- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display'])
--
-- If the sandbox doesn't exist, it is in the format:
--
-- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display'])
--
-- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload']
-- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display']
-- loads a default edit summary of cfg['mirror-edit-summary'].
--
-- $2 is a link to the test cases page. If the test cases page exists, it is in the following format:
--
-- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'])
--
-- If the test cases page doesn't exist, it is in the format:
--
-- cfg['testcases-link-display'] (cfg['testcases-create-link-display'])
--
-- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the
-- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current
-- namespace.
--]]
cfg['experiment-blurb-template'] = format('experiment-blurb-template')
cfg['experiment-blurb-module'] = format('experiment-blurb-module')
----------------------------------------------------------------------------------------------------
-- Sandbox link configuration
----------------------------------------------------------------------------------------------------
-- cfg['sandbox-subpage']
-- The name of the template subpage typically used for sandboxes.
cfg['sandbox-subpage'] = 'sandbox'
-- cfg['template-sandbox-preload']
-- Preload file for template sandbox pages.
cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox'
-- cfg['module-sandbox-preload']
-- Preload file for Lua module sandbox pages.
cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox'
-- cfg['sandbox-link-display']
-- The text to display for "sandbox" links.
cfg['sandbox-link-display'] = format('sandbox-link-display')
-- cfg['sandbox-edit-link-display']
-- The text to display for sandbox "edit" links.
cfg['sandbox-edit-link-display'] = format('sandbox-edit-link-display')
-- cfg['sandbox-create-link-display']
-- The text to display for sandbox "create" links.
cfg['sandbox-create-link-display'] = format('sandbox-create-link-display')
-- cfg['compare-link-display']
-- The text to display for "compare" links.
cfg['compare-link-display'] = format('compare-link-display')
-- cfg['mirror-edit-summary']
-- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the
-- template page.
cfg['mirror-edit-summary'] = 'Create sandbox version of $1'
-- cfg['mirror-link-display']
-- The text to display for "mirror" links.
cfg['mirror-link-display'] = format('mirror-link-display')
-- cfg['mirror-link-preload']
-- The page to preload when a user clicks the "mirror" link.
cfg['mirror-link-preload'] = 'Template:Documentation/mirror'
----------------------------------------------------------------------------------------------------
-- Test cases link configuration
----------------------------------------------------------------------------------------------------
-- cfg['testcases-subpage']
-- The name of the template subpage typically used for test cases.
cfg['testcases-subpage'] = 'testcases'
-- cfg['template-testcases-preload']
-- Preload file for template test cases pages.
cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases'
-- cfg['module-testcases-preload']
-- Preload file for Lua module test cases pages.
cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases'
-- cfg['testcases-link-display']
-- The text to display for "testcases" links.
cfg['testcases-link-display'] = format('testcases-link-display')
-- cfg['testcases-edit-link-display']
-- The text to display for test cases "edit" links.
cfg['testcases-edit-link-display'] = format('testcases-edit-link-display')
-- cfg['testcases-create-link-display']
-- The text to display for test cases "create" links.
cfg['testcases-create-link-display'] = format('testcases-create-link-display')
----------------------------------------------------------------------------------------------------
-- Add categories blurb configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['add-categories-blurb']
-- Text to direct users to add categories to the /doc subpage. Not used if the "content" or
-- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a
-- link to the /doc subpage with a display value of cfg['doc-link-display'].
--]]
cfg['add-categories-blurb'] = format('add-categories-blurb')
-- cfg['doc-link-display']
-- The text to display when linking to the /doc subpage.
cfg['doc-link-display'] = '/doc'
----------------------------------------------------------------------------------------------------
-- Subpages link configuration
----------------------------------------------------------------------------------------------------
--[[
-- cfg['subpages-blurb']
-- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a
-- display value of cfg['subpages-link-display']. In the English version this blurb is simply
-- the link followed by a period, and the link display provides the actual text.
--]]
cfg['subpages-blurb'] = format('subpages-blurb')
--[[
-- cfg['subpages-link-display']
-- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'],
-- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in
-- the template namespace, the module namespace, or another namespace.
--]]
cfg['subpages-link-display'] = format('subpages-link-display')
-- cfg['template-pagetype']
-- The pagetype to display for template pages.
cfg['template-pagetype'] = format('template-pagetype')
-- cfg['module-pagetype']
-- The pagetype to display for Lua module pages.
cfg['module-pagetype'] = format('module-pagetype')
-- cfg['default-pagetype']
-- The pagetype to display for pages other than templates or Lua modules.
cfg['default-pagetype'] = format('default-pagetype')
----------------------------------------------------------------------------------------------------
-- Doc link configuration
----------------------------------------------------------------------------------------------------
-- cfg['doc-subpage']
-- The name of the subpage typically used for documentation pages.
cfg['doc-subpage'] = 'doc'
-- cfg['file-docpage-preload']
-- Preload file for documentation page in the file namespace.
cfg['file-docpage-preload'] = 'Template:Documentation/preload-filespace'
-- cfg['docpage-preload']
-- Preload file for template documentation pages in all namespaces.
cfg['docpage-preload'] = 'Template:Documentation/preload'
-- cfg['module-preload']
-- Preload file for Lua module documentation pages.
cfg['module-preload'] = 'Template:Documentation/preload-module-doc'
----------------------------------------------------------------------------------------------------
-- Print version configuration
----------------------------------------------------------------------------------------------------
-- cfg['print-subpage']
-- The name of the template subpage used for print versions.
cfg['print-subpage'] = 'Print'
-- cfg['print-link-display']
-- The text to display when linking to the /Print subpage.
cfg['print-link-display'] = '/Print'
-- cfg['print-blurb']
-- Text to display if a /Print subpage exists. $1 is a link to the subpage with a display value of cfg['print-link-display'].
cfg['print-blurb'] = format('print-blurb')
-- cfg['display-print-category']
-- Set to true to enable output of cfg['print-category'] if a /Print subpage exists.
-- This should be a boolean value (either true or false).
cfg['display-print-category'] = true
-- cfg['print-category']
-- Category to output if cfg['display-print-category'] is set to true, and a /Print subpage exists.
cfg['print-category'] = 'Templates with print versions'
----------------------------------------------------------------------------------------------------
-- HTML and CSS configuration
----------------------------------------------------------------------------------------------------
-- cfg['main-div-id']
-- The "id" attribute of the main HTML "div" tag.
cfg['main-div-id'] = 'template-documentation'
-- cfg['main-div-classes']
-- The CSS classes added to the main HTML "div" tag.
cfg['main-div-class'] = 'ts-doc-doc'
cfg['header-div-class'] = 'ts-doc-header'
cfg['heading-div-class'] = 'ts-doc-heading'
cfg['content-div-class'] = 'ts-doc-content'
cfg['footer-div-class'] = 'ts-doc-footer plainlinks'
cfg['sandbox-class'] = 'ts-doc-sandbox'
-- cfg['start-box-linkclasses']
-- The CSS classes used for the [view][edit][history] or [create] links in the start box.
cfg['start-box-linkclasses'] = 'ts-tlinks-tlinks mw-editsection-like plainlinks'
-- cfg['start-box-link-id']
-- The HTML "id" attribute for the links in the start box.
cfg['start-box-link-id'] = 'doc_editlinks'
----------------------------------------------------------------------------------------------------
-- Tracking category configuration
----------------------------------------------------------------------------------------------------
-- cfg['display-strange-usage-category']
-- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage
-- or a /testcases subpage. This should be a boolean value (either true or false).
cfg['display-strange-usage-category'] = false
-- cfg['strange-usage-category']
-- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a
-- /doc subpage or a /testcases subpage.
cfg['strange-usage-category'] = 'Pages with strange ((documentation)) usage'
--[[
----------------------------------------------------------------------------------------------------
-- End configuration
--
-- Don't edit anything below this line.
----------------------------------------------------------------------------------------------------
--]]
return cfg
224f3664a83268936f1b9935eafc0055a97071ac
Module:Documentation/i18n
828
14
26
25
2023-12-15T14:47:14Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
local format = require('Module:TNT').format
local i18n = {}
i18n['cfg-error-msg-type'] = format('I18n/Documentation', 'cfg-error-msg-type')
i18n['cfg-error-msg-empty'] = format('I18n/Documentation', 'cfg-error-msg-empty')
-- cfg['template-namespace-heading']
-- The heading shown in the template namespace.
i18n['template-namespace-heading'] = format('I18n/Documentation', 'template-namespace-heading')
-- cfg['module-namespace-heading']
-- The heading shown in the module namespace.
i18n['module-namespace-heading'] = format('I18n/Documentation', 'module-namespace-heading')
-- cfg['file-namespace-heading']
-- The heading shown in the file namespace.
i18n['file-namespace-heading'] = format('I18n/Documentation', 'file-namespace-heading')
-- cfg['other-namespaces-heading']
-- The heading shown in other namespaces.
i18n['other-namespaces-heading'] = format('I18n/Documentation', 'other-namespaces-heading')
-- cfg['view-link-display']
-- The text to display for "view" links.
i18n['view-link-display'] = format('I18n/Documentation', 'view-link-display')
-- cfg['edit-link-display']
-- The text to display for "edit" links.
i18n['edit-link-display'] = format('I18n/Documentation', 'edit-link-display')
-- cfg['history-link-display']
-- The text to display for "history" links.
i18n['history-link-display'] = format('I18n/Documentation', 'history-link-display')
-- cfg['purge-link-display']
-- The text to display for "purge" links.
i18n['purge-link-display'] = format('I18n/Documentation', 'purge-link-display')
-- cfg['create-link-display']
-- The text to display for "create" links.
i18n['create-link-display'] = format('I18n/Documentation', 'create-link-display')
return i18n
9a9f234b177a424f1fc465eb25c484eff54905c0
Module:Documentation/styles.css
828
15
28
27
2023-12-15T14:47:15Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
sanitized-css
text/css
.ts-doc-sandbox .mbox-image {
padding:.75em 0 .75em .75em;
}
.ts-doc-doc {
clear: both;
background-color: #eaf3ff;
border: 1px solid #a3caff;
margin-top: 1em;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.ts-doc-header {
background-color: #c2dcff;
padding: .642857em 1em .5em;
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.ts-doc-header .ts-tlinks-tlinks {
line-height: 24px;
margin-left: 0;
}
.ts-doc-header .ts-tlinks-tlinks a.external {
color: #0645ad;
}
.ts-doc-header .ts-tlinks-tlinks a.external:visited {
color: #0b0080;
}
.ts-doc-header .ts-tlinks-tlinks a.external:active {
color: #faa700;
}
.ts-doc-content {
padding: .214286em 1em;
}
.ts-doc-content:after {
content: '';
clear: both;
display: block;
}
.ts-doc-heading {
display: inline-block;
padding-left: 30px;
background: center left/24px 24px no-repeat;
/* @noflip */
background-image: url(//upload.wikimedia.org/wikipedia/commons/f/fb/OOjs_UI_icon_puzzle-ltr.svg);
height: 24px;
line-height: 24px;
font-size: 13px;
font-weight: 600;
letter-spacing: 1px;
text-transform: uppercase;
}
.ts-doc-content > *:first-child,
.ts-doc-footer > *:first-child {
margin-top: .5em;
}
.ts-doc-content > *:last-child,
.ts-doc-footer > *:last-child {
margin-bottom: .5em;
}
.ts-doc-footer {
background-color: #eaf3ff;
border: 1px solid #a3caff;
padding: .214286em 1em;
margin-top: .214286em;
font-style: italic;
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
@media all and (min-width: 720px) {
.ts-doc-header .ts-tlinks-tlinks {
float: right;
}
}
71b09af67524324bf70d203a0a724bc74ec6c82e
Module:Effective protection level
828
16
30
29
2023-12-15T14:47:15Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
local p = {}
-- Returns the permission required to perform a given action on a given title.
-- If no title is specified, the title of the page being displayed is used.
function p._main(action, pagename)
local title
if type(pagename) == 'table' and pagename.prefixedText then
title = pagename
elseif pagename then
title = mw.title.new(pagename)
else
title = mw.title.getCurrentTitle()
end
pagename = title.prefixedText
if action ~= 'edit' and action ~= 'move' and action ~= 'create' and action ~= 'upload' then
error( 'First parameter must be one of edit, move, create, upload', 2 )
end
if title.namespace == 8 then -- MediaWiki namespace
if title.contentModel == 'javascript' or title.contentModel == 'css' then -- site JS or CSS page
return 'interfaceadmin'
else -- any non-JS/CSS MediaWiki page
return 'sysop'
end
elseif title.namespace == 2 and title.isSubpage then
if title.contentModel == 'javascript' or title.contentModel == 'css' then -- user JS or CSS page
return 'interfaceadmin'
elseif title.contentModel == 'json' then -- user JSON page
return 'sysop'
end
end
local level = title.protectionLevels[action] and title.protectionLevels[action][1]
if level == 'sysop' or level == 'editprotected' then
return 'sysop'
elseif title.cascadingProtection.restrictions[action] and title.cascadingProtection.restrictions[action][1] then -- used by a cascading-protected page
return 'sysop'
elseif action == 'move' then
local blacklistentry = mw.ext.TitleBlacklist.test('edit', pagename) -- Testing action edit is correct, since this is for the source page. The target page name gets tested with action move.
if blacklistentry and not blacklistentry.params.autoconfirmed then
return 'sysop'
elseif title.namespace == 6 then
return 'sysop'
else
return 'autoconfirmed'
end
end
local blacklistentry = mw.ext.TitleBlacklist.test(action, pagename)
if blacklistentry then
if not blacklistentry.params.autoconfirmed then
return 'sysop'
else
return 'autoconfirmed'
end
elseif level == 'editsemiprotected' then -- create-semiprotected pages return this for some reason
return 'autoconfirmed'
elseif level then
return level
elseif action == 'upload' then
return 'uploader'
else
return '*'
end
end
setmetatable(p, { __index = function(t, k)
return function(frame)
return t._main(k, frame.args[1])
end
end })
return p
022c037fc8895cf858d579fcc2b58907ef93a92e
Module:List
828
17
32
31
2023-12-15T14:47:16Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
-- This module outputs different kinds of lists. At the moment, bulleted,
-- unbulleted, horizontal, ordered, and horizontal ordered lists are supported.
local libUtil = require('libraryUtil')
local checkType = libUtil.checkType
local mTableTools = require('Module:TableTools')
local p = {}
local listTypes = {
['bulleted'] = true,
['unbulleted'] = true,
['horizontal'] = true,
['ordered'] = true,
['horizontal_ordered'] = true
}
function p.makeListData(listType, args)
-- Constructs a data table to be passed to p.renderList.
local data = {}
-- Classes
data.classes = {}
data.templatestyles = ''
if listType == 'horizontal' or listType == 'horizontal_ordered' then
table.insert(data.classes, 'hlist')
data.templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Flatlist/styles.css' }
}
elseif listType == 'unbulleted' then
table.insert(data.classes, 'plainlist')
data.templatestyles = mw.getCurrentFrame():extensionTag{
name = 'templatestyles', args = { src = 'Plainlist/styles.css' }
}
end
table.insert(data.classes, args.class)
-- Main div style
data.style = args.style
-- Indent for horizontal lists
if listType == 'horizontal' or listType == 'horizontal_ordered' then
local indent = tonumber(args.indent)
indent = indent and indent * 1.6 or 0
if indent > 0 then
data.marginLeft = indent .. 'em'
end
end
-- List style types for ordered lists
-- This could be "1, 2, 3", "a, b, c", or a number of others. The list style
-- type is either set by the "type" attribute or the "list-style-type" CSS
-- property.
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listStyleType = args.list_style_type or args['list-style-type']
data.type = args['type']
-- Detect invalid type attributes and attempt to convert them to
-- list-style-type CSS properties.
if data.type
and not data.listStyleType
and not tostring(data.type):find('^%s*[1AaIi]%s*$')
then
data.listStyleType = data.type
data.type = nil
end
end
-- List tag type
if listType == 'ordered' or listType == 'horizontal_ordered' then
data.listTag = 'ol'
else
data.listTag = 'ul'
end
-- Start number for ordered lists
data.start = args.start
if listType == 'horizontal_ordered' then
-- Apply fix to get start numbers working with horizontal ordered lists.
local startNum = tonumber(data.start)
if startNum then
data.counterReset = 'listitem ' .. tostring(startNum - 1)
end
end
-- List style
-- ul_style and ol_style are included for backwards compatibility. No
-- distinction is made for ordered or unordered lists.
data.listStyle = args.list_style
-- List items
-- li_style is included for backwards compatibility. item_style was included
-- to be easier to understand for non-coders.
data.itemStyle = args.item_style or args.li_style
data.items = {}
for i, num in ipairs(mTableTools.numKeys(args)) do
local item = {}
item.content = args[num]
item.style = args['item' .. tostring(num) .. '_style']
or args['item_style' .. tostring(num)]
item.value = args['item' .. tostring(num) .. '_value']
or args['item_value' .. tostring(num)]
table.insert(data.items, item)
end
return data
end
function p.renderList(data)
-- Renders the list HTML.
-- Return the blank string if there are no list items.
if type(data.items) ~= 'table' or #data.items < 1 then
return ''
end
-- Render the main div tag.
local root = mw.html.create((
#data.classes > 0
or data.marginLeft
or data.style
) and 'div' or nil)
for i, class in ipairs(data.classes or {}) do
root:addClass(class)
end
root:css{['margin-left'] = data.marginLeft}
if data.style then
root:cssText(data.style)
end
-- Render the list tag.
local list = root:tag(data.listTag or 'ul')
list
:attr{start = data.start, type = data.type}
:css{
['counter-reset'] = data.counterReset,
['list-style-type'] = data.listStyleType
}
if data.listStyle then
list:cssText(data.listStyle)
end
-- Render the list items
for i, t in ipairs(data.items or {}) do
local item = list:tag('li')
if data.itemStyle then
item:cssText(data.itemStyle)
end
if t.style then
item:cssText(t.style)
end
item
:attr{value = t.value}
:wikitext(t.content)
end
return data.templatestyles .. tostring(root)
end
function p.makeList(listType, args)
if not listType or not listTypes[listType] then
error(string.format(
"bad argument #1 to 'makeList' ('%s' is not a valid list type)",
tostring(listType)
), 2)
end
checkType('makeList', 2, args, 'table')
local data = p.makeListData(listType, args)
return p.renderList(data)
end
for listType in pairs(listTypes) do
p[listType] = function (frame)
local mArguments = require('Module:Arguments')
local origArgs = mArguments.getArgs(frame)
-- Copy all the arguments to a new table, for faster indexing.
local args = {}
for k, v in pairs(origArgs) do
args[k] = v
end
return p.makeList(listType, args)
end
end
return p
d701c0798e541793aa5ed1e9af50fc3b20548907
Module:Lua banner
828
18
34
33
2023-12-15T14:47:16Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
-- This module implements the {{lua}} template.
local yesno = require('Module:Yesno')
local mList = require('Module:List')
local mTableTools = require('Module:TableTools')
local mMessageBox = require('Module:Message box')
local TNT = require('Module:TNT')
local p = {}
local function format(msg)
return TNT.format('I18n/Lua banner', msg)
end
local function getConfig()
return mw.loadData('Module:Lua banner/config')
end
function p.main(frame)
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
v = v:match('^%s*(.-)%s*$')
if v ~= '' then
args[k] = v
end
end
return p._main(args)
end
function p._main(args, cfg)
local modules = mTableTools.compressSparseArray(args)
local box = p.renderBox(modules, cfg, args)
local trackingCategories = p.renderTrackingCategories(args, modules, nil, cfg)
return box .. trackingCategories
end
function p.renderBox(modules, cfg, args)
local boxArgs = {}
if #modules < 1 then
cfg = cfg or getConfig()
if cfg['allow_wishes'] or yesno(args and args.wish) then
boxArgs.text = format('wishtext')
else
boxArgs.text = string.format('<strong class="error">%s</strong>', format('error_emptylist'))
end
else
local moduleLinks = {}
for i, module in ipairs(modules) do
moduleLinks[i] = string.format('[[:%s]]', module)
end
local moduleList = mList.makeList('bulleted', moduleLinks)
boxArgs.text = format('header') .. '\n' .. moduleList
end
boxArgs.type = 'notice'
boxArgs.small = true
boxArgs.image = string.format(
'[[File:Lua-logo-nolabel.svg|30px|alt=%s|link=%s]]',
format('logo_alt'),
format('logo_link')
)
return mMessageBox.main('mbox', boxArgs)
end
function p.renderTrackingCategories(args, modules, titleObj, cfg)
if yesno(args.nocat) then
return ''
end
cfg = cfg or getConfig()
local cats = {}
-- Error category
if #modules < 1 and not (cfg['allow_wishes'] or yesno(args.wish)) and cfg['error_category'] then
cats[#cats + 1] = cfg['error_category']
end
-- Lua templates category
titleObj = titleObj or mw.title.getCurrentTitle()
if titleObj.namespace == 10
and not cfg['subpage_blacklist'][titleObj.subpageText]
then
local category = args.category
if not category then
local pagename = modules[1] and mw.title.new(modules[1])
category = pagename and cfg['module_categories'][pagename.text]
if not category then
if (cfg['allow_wishes'] or yesno(args.wish)) and #modules < 1 then
category = cfg['wish_category']
else
category = cfg['default_category']
end
end
end
if category then
cats[#cats + 1] = category
end
end
for i, cat in ipairs(cats) do
cats[i] = string.format('[[Category:%s]]', cat)
end
return table.concat(cats)
end
return p
4b55b48bd92caeb84decde5f14c77b68ae09653e
Module:Lua banner/config
828
19
36
35
2023-12-15T14:47:17Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
local cfg = {} -- Don’t touch this line.
-- Subpage blacklist: these subpages will not be categorized (except for the
-- error category, which is always added if there is an error).
-- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have
-- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules,
-- so they *will* have categories. All rules should be in the
-- ['<subpage name>'] = true,
-- format.
cfg['subpage_blacklist'] = {
['doc'] = true,
['sandbox'] = true,
['sandbox2'] = true,
['testcases'] = true,
}
-- Allow wishes: whether wishes for conversion to Lua are allowed.
-- If true, calls with zero parameters are valid, and considered to be wishes:
-- The box’s text is “This template should use Lua”, and cfg['wish_category'] is
-- added. If false, such calls are invalid, an error message appears, and
-- cfg['error_category'] is added.
cfg['allow_wishes'] = false
-- Default category: this category is added if the module call contains errors
-- (e.g. no module listed). A category name without namespace, or nil
-- to disable categorization (not recommended).
cfg['error_category'] = 'Lua templates with errors'
-- Wish category: this category is added if no module is listed, and wishes are
-- allowed. (Not used if wishes are not allowed.) A category name without
-- namespace, or nil to disable categorization.
cfg['wish_category'] = 'Lua-candidates'
-- Default category: this category is added if none of the below module_categories
-- matches the first module listed. A category name without namespace, or nil
-- to disable categorization.
cfg['default_category'] = 'Lua-based templates'
-- Module categories: one of these categories is added if the first listed module
-- is the listed module (e.g. {{Lua|Module:String}} adds
-- [[Category:Lua String-based templates]].) Format:
-- ['<module name>'] = '<category name>'
-- where neither <module name> nor <category name> contains namespace. An empty
-- table (i.e. no module-based categorization) will suffice on smaller wikis.
cfg['module_categories'] = {
['String'] = 'Lua String-based templates',
}
return cfg -- Don’t touch this line.
960aa5bb0f008cf7e3ef37963e1dbc797c2ffdd5
Module:Message box
828
20
38
37
2023-12-15T14:47:17Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
-- This is a meta-module for producing message box templates, including
-- {{mbox}}, {{ambox}}, {{imbox}}, {{tmbox}}, {{ombox}}, {{cmbox}} and {{fmbox}}.
-- Load necessary modules.
require('strict')
local getArgs
local yesno = require('Module:Yesno')
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'}
local TEMPLATE_STYLES = 'Module:Message box/%s.css'
--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
local function getTitleObject(...)
-- Get the title object, passing the function through pcall
-- in case we are over the expensive function count limit.
local success, title = pcall(mw.title.new, ...)
if success then
return title
end
end
local function union(t1, t2)
-- Returns the union of two arrays.
local vals = {}
for i, v in ipairs(t1) do
vals[v] = true
end
for i, v in ipairs(t2) do
vals[v] = true
end
local ret = {}
for k in pairs(vals) do
table.insert(ret, k)
end
table.sort(ret)
return ret
end
local function getArgNums(args, prefix)
local nums = {}
for k, v in pairs(args) do
local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$')
if num then
table.insert(nums, tonumber(num))
end
end
table.sort(nums)
return nums
end
--------------------------------------------------------------------------------
-- Box class definition
--------------------------------------------------------------------------------
local MessageBox = {}
MessageBox.__index = MessageBox
function MessageBox.new(boxType, args, cfg)
args = args or {}
local obj = {}
obj.boxType = boxType
-- Set the title object and the namespace.
obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle()
-- Set the config for our box type.
obj.cfg = cfg[boxType]
if not obj.cfg then
local ns = obj.title.namespace
-- boxType is "mbox" or invalid input
if args.demospace and args.demospace ~= '' then
-- implement demospace parameter of mbox
local demospace = string.lower(args.demospace)
if DEMOSPACES[demospace] then
-- use template from DEMOSPACES
obj.cfg = cfg[DEMOSPACES[demospace]]
obj.boxType = DEMOSPACES[demospace]
elseif string.find( demospace, 'talk' ) then
-- demo as a talk page
obj.cfg = cfg.tmbox
obj.boxType = 'tmbox'
else
-- default to ombox
obj.cfg = cfg.ombox
obj.boxType = 'ombox'
end
elseif ns == 0 then
obj.cfg = cfg.ambox -- main namespace
obj.boxType = 'ambox'
elseif ns == 6 then
obj.cfg = cfg.imbox -- file namespace
obj.boxType = 'imbox'
elseif ns == 14 then
obj.cfg = cfg.cmbox -- category namespace
obj.boxType = 'cmbox'
else
local nsTable = mw.site.namespaces[ns]
if nsTable and nsTable.isTalk then
obj.cfg = cfg.tmbox -- any talk namespace
obj.boxType = 'tmbox'
else
obj.cfg = cfg.ombox -- other namespaces or invalid input
obj.boxType = 'ombox'
end
end
end
-- Set the arguments, and remove all blank arguments except for the ones
-- listed in cfg.allowBlankParams.
do
local newArgs = {}
for k, v in pairs(args) do
if v ~= '' then
newArgs[k] = v
end
end
for i, param in ipairs(obj.cfg.allowBlankParams or {}) do
newArgs[param] = args[param]
end
obj.args = newArgs
end
-- Define internal data structure.
obj.categories = {}
obj.classes = {}
-- For lazy loading of [[Module:Category handler]].
obj.hasCategories = false
return setmetatable(obj, MessageBox)
end
function MessageBox:addCat(ns, cat, sort)
if not cat then
return nil
end
if sort then
cat = string.format('[[Category:%s|%s]]', cat, sort)
else
cat = string.format('[[Category:%s]]', cat)
end
self.hasCategories = true
self.categories[ns] = self.categories[ns] or {}
table.insert(self.categories[ns], cat)
end
function MessageBox:addClass(class)
if not class then
return nil
end
self.classes[class] = 1
end
function MessageBox:removeClass(class)
if not class then
return nil
end
self.classes[class] = nil
end
function MessageBox:setParameters()
local args = self.args
local cfg = self.cfg
-- Get type data.
self.type = args.type
local typeData = cfg.types[self.type]
self.invalidTypeError = cfg.showInvalidTypeError
and self.type
and not typeData
typeData = typeData or cfg.types[cfg.default]
self.typeClass = typeData.class
self.typeImage = typeData.image
-- Find if the box has been wrongly substituted.
self.isSubstituted = cfg.substCheck and args.subst == 'SUBST'
-- Find whether we are using a small message box.
self.isSmall = cfg.allowSmall and (
cfg.smallParam and args.small == cfg.smallParam
or not cfg.smallParam and yesno(args.small)
)
-- Add attributes, classes and styles.
self.id = args.id
self.name = args.name
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
end
if self.name then
self:addClass('box-' .. string.gsub(self.name,' ','_'))
end
local plainlinks = yesno(args.plainlinks)
if plainlinks == true then
self:addClass('plainlinks')
elseif plainlinks == false then
self:removeClass('plainlinks')
end
if self.isSmall then
self:addClass(cfg.smallClass or 'mbox-small')
end
self:addClass(self.typeClass)
self:addClass(args.class)
self.style = args.style
self.attrs = args.attrs
-- Set text style.
self.textstyle = args.textstyle
-- Find if we are on the template page or not. This functionality is only
-- used if useCollapsibleTextFields is set, or if both cfg.templateCategory
-- and cfg.templateCategoryRequireName are set.
self.useCollapsibleTextFields = cfg.useCollapsibleTextFields
if self.useCollapsibleTextFields
or cfg.templateCategory
and cfg.templateCategoryRequireName
then
if self.name then
local templateName = mw.ustring.match(
self.name,
'^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$'
) or self.name
templateName = 'Template:' .. templateName
self.templateTitle = getTitleObject(templateName)
end
self.isTemplatePage = self.templateTitle
and mw.title.equals(self.title, self.templateTitle)
end
-- Process data for collapsible text fields. At the moment these are only
-- used in {{ambox}}.
if self.useCollapsibleTextFields then
-- Get the self.issue value.
if self.isSmall and args.smalltext then
self.issue = args.smalltext
else
local sect
if args.sect == '' then
sect = 'This ' .. (cfg.sectionDefault or 'page')
elseif type(args.sect) == 'string' then
sect = 'This ' .. args.sect
end
local issue = args.issue
issue = type(issue) == 'string' and issue ~= '' and issue or nil
local text = args.text
text = type(text) == 'string' and text or nil
local issues = {}
table.insert(issues, sect)
table.insert(issues, issue)
table.insert(issues, text)
self.issue = table.concat(issues, ' ')
end
-- Get the self.talk value.
local talk = args.talk
-- Show talk links on the template page or template subpages if the talk
-- parameter is blank.
if talk == ''
and self.templateTitle
and (
mw.title.equals(self.templateTitle, self.title)
or self.title:isSubpageOf(self.templateTitle)
)
then
talk = '#'
elseif talk == '' then
talk = nil
end
if talk then
-- If the talk value is a talk page, make a link to that page. Else
-- assume that it's a section heading, and make a link to the talk
-- page of the current page with that section heading.
local talkTitle = getTitleObject(talk)
local talkArgIsTalkPage = true
if not talkTitle or not talkTitle.isTalkPage then
talkArgIsTalkPage = false
talkTitle = getTitleObject(
self.title.text,
mw.site.namespaces[self.title.namespace].talk.id
)
end
if talkTitle and talkTitle.exists then
local talkText = 'Relevant discussion may be found on'
if talkArgIsTalkPage then
talkText = string.format(
'%s [[%s|%s]].',
talkText,
talk,
talkTitle.prefixedText
)
else
talkText = string.format(
'%s the [[%s#%s|talk page]].',
talkText,
talkTitle.prefixedText,
talk
)
end
self.talk = talkText
end
end
-- Get other values.
self.fix = args.fix ~= '' and args.fix or nil
local date
if args.date and args.date ~= '' then
date = args.date
elseif args.date == '' and self.isTemplatePage then
date = lang:formatDate('F Y')
end
if date then
self.date = string.format(" <small class='date-container'>''(<span class='date'>%s</span>)''</small>", date)
end
self.info = args.info
if yesno(args.removalnotice) then
self.removalNotice = cfg.removalNotice
end
end
-- Set the non-collapsible text field. At the moment this is used by all box
-- types other than ambox, and also by ambox when small=yes.
if self.isSmall then
self.text = args.smalltext or args.text
else
self.text = args.text
end
-- Set the below row.
self.below = cfg.below and args.below
-- General image settings.
self.imageCellDiv = not self.isSmall and cfg.imageCellDiv
self.imageEmptyCell = cfg.imageEmptyCell
if cfg.imageEmptyCellStyle then
self.imageEmptyCellStyle = 'border:none;padding:0px;width:1px'
end
-- Left image settings.
local imageLeft = self.isSmall and args.smallimage or args.image
if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none'
or not cfg.imageCheckBlank and imageLeft ~= 'none'
then
self.imageLeft = imageLeft
if not imageLeft then
local imageSize = self.isSmall
and (cfg.imageSmallSize or '30x30px')
or '40x40px'
self.imageLeft = string.format('[[File:%s|%s|link=|alt=]]', self.typeImage
or 'Information icon4.svg', imageSize)
end
end
-- Right image settings.
local imageRight = self.isSmall and args.smallimageright or args.imageright
if not (cfg.imageRightNone and imageRight == 'none') then
self.imageRight = imageRight
end
end
function MessageBox:setMainspaceCategories()
local args = self.args
local cfg = self.cfg
if not cfg.allowMainspaceCategories then
return nil
end
local nums = {}
for _, prefix in ipairs{'cat', 'category', 'all'} do
args[prefix .. '1'] = args[prefix]
nums = union(nums, getArgNums(args, prefix))
end
-- The following is roughly equivalent to the old {{Ambox/category}}.
local date = args.date
date = type(date) == 'string' and date
local preposition = 'from'
for _, num in ipairs(nums) do
local mainCat = args['cat' .. tostring(num)]
or args['category' .. tostring(num)]
local allCat = args['all' .. tostring(num)]
mainCat = type(mainCat) == 'string' and mainCat
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = string.format('%s %s %s', mainCat, preposition, date)
self:addCat(0, catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat(0, 'Articles with invalid date parameter in template')
end
elseif mainCat and (not date or date == '') then
self:addCat(0, mainCat)
end
if allCat then
self:addCat(0, allCat)
end
end
end
function MessageBox:setTemplateCategories()
local args = self.args
local cfg = self.cfg
-- Add template categories.
if cfg.templateCategory then
if cfg.templateCategoryRequireName then
if self.isTemplatePage then
self:addCat(10, cfg.templateCategory)
end
elseif not self.title.isSubpage then
self:addCat(10, cfg.templateCategory)
end
end
-- Add template error categories.
if cfg.templateErrorCategory then
local templateErrorCategory = cfg.templateErrorCategory
local templateCat, templateSort
if not self.name and not self.title.isSubpage then
templateCat = templateErrorCategory
elseif self.isTemplatePage then
local paramsToCheck = cfg.templateErrorParamsToCheck or {}
local count = 0
for i, param in ipairs(paramsToCheck) do
if not args[param] then
count = count + 1
end
end
if count > 0 then
templateCat = templateErrorCategory
templateSort = tostring(count)
end
if self.categoryNums and #self.categoryNums > 0 then
templateCat = templateErrorCategory
templateSort = 'C'
end
end
self:addCat(10, templateCat, templateSort)
end
end
function MessageBox:setAllNamespaceCategories()
-- Set categories for all namespaces.
if self.isSubstituted then
self:addCat('all', 'Pages with incorrectly substituted templates')
end
end
function MessageBox:setCategories()
if self.title.namespace == 0 then
self:setMainspaceCategories()
elseif self.title.namespace == 10 then
self:setTemplateCategories()
end
self:setAllNamespaceCategories()
end
function MessageBox:renderCategories()
if not self.hasCategories then
-- No categories added, no need to pass them to Category handler so,
-- if it was invoked, it would return the empty string.
-- So we shortcut and return the empty string.
return ""
end
-- Convert category tables to strings and pass them through
-- [[Module:Category handler]].
return require('Module:Category handler')._main{
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
all = table.concat(self.categories.all or {}),
nocat = self.args.nocat,
page = self.args.page
}
end
function MessageBox:export()
local root = mw.html.create()
-- Add the subst check error.
if self.isSubstituted and self.name then
root:tag('b')
:addClass('error')
:wikitext(string.format(
'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.',
mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}')
))
end
-- Add TemplateStyles
root:wikitext(mw.getCurrentFrame():extensionTag{
name = 'templatestyles',
args = { src = TEMPLATE_STYLES:format(self.boxType) },
})
-- Create the box table.
local boxTable
-- Check for fmbox because not all interface messages have mw-parser-output
-- which is necessary for TemplateStyles. Add the wrapper class if it is and
-- then start the actual mbox, else start the mbox.
if self.boxType == 'fmbox' then
boxTable = root:tag('div')
:addClass('mw-parser-output')
:tag('table')
else
boxTable = root:tag('table')
end
boxTable:attr('id', self.id or nil)
for class, _ in pairs(self.classes or {}) do
boxTable:addClass(class or nil)
end
boxTable
:cssText(self.style or nil)
:attr('role', 'presentation')
if self.attrs then
boxTable:attr(self.attrs)
end
-- Add the left-hand image.
local row = boxTable:tag('tr')
if self.imageLeft then
local imageLeftCell = row:tag('td'):addClass('mbox-image')
if self.imageCellDiv then
-- If we are using a div, redefine imageLeftCell so that the image
-- is inside it. Divs use style="width: 52px;", which limits the
-- image width to 52px. If any images in a div are wider than that,
-- they may overlap with the text or cause other display problems.
imageLeftCell = imageLeftCell:tag('div'):css('width', '52px')
end
imageLeftCell:wikitext(self.imageLeft or nil)
elseif self.imageEmptyCell then
-- Some message boxes define an empty cell if no image is specified, and
-- some don't. The old template code in templates where empty cells are
-- specified gives the following hint: "No image. Cell with some width
-- or padding necessary for text cell to have 100% width."
row:tag('td')
:addClass('mbox-empty-cell')
:cssText(self.imageEmptyCellStyle or nil)
end
-- Add the text.
local textCell = row:tag('td'):addClass('mbox-text')
if self.useCollapsibleTextFields then
-- The message box uses advanced text parameters that allow things to be
-- collapsible. At the moment, only ambox uses this.
textCell:cssText(self.textstyle or nil)
local textCellDiv = textCell:tag('div')
textCellDiv
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
textCellDiv:tag('span')
:addClass('hide-when-compact')
:wikitext(self.talk and (' ' .. self.talk) or nil)
:wikitext(self.fix and (' ' .. self.fix) or nil)
end
textCellDiv:wikitext(self.date and (' ' .. self.date) or nil)
if self.info and not self.isSmall then
textCellDiv
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
if self.removalNotice then
textCellDiv:tag('small')
:addClass('hide-when-compact')
:tag('i')
:wikitext(string.format(" (%s)", self.removalNotice))
end
else
-- Default text formatting - anything goes.
textCell
:cssText(self.textstyle or nil)
:wikitext(self.text or nil)
end
-- Add the right-hand image.
if self.imageRight then
local imageRightCell = row:tag('td'):addClass('mbox-imageright')
if self.imageCellDiv then
-- If we are using a div, redefine imageRightCell so that the image
-- is inside it.
imageRightCell = imageRightCell:tag('div'):css('width', '52px')
end
imageRightCell
:wikitext(self.imageRight or nil)
end
-- Add the below row.
if self.below then
boxTable:tag('tr')
:tag('td')
:attr('colspan', self.imageRight and '3' or '2')
:addClass('mbox-text')
:cssText(self.textstyle or nil)
:wikitext(self.below or nil)
end
-- Add error message for invalid type parameters.
if self.invalidTypeError then
root:tag('div')
:css('text-align', 'center')
:wikitext(string.format(
'This message box is using an invalid "type=%s" parameter and needs fixing.',
self.type or ''
))
end
-- Add categories.
root:wikitext(self:renderCategories() or nil)
return tostring(root)
end
--------------------------------------------------------------------------------
-- Exports
--------------------------------------------------------------------------------
local p, mt = {}, {}
function p._exportClasses()
-- For testing.
return {
MessageBox = MessageBox
}
end
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE))
box:setParameters()
box:setCategories()
return box:export()
end
function mt.__index(t, k)
return function (frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return t.main(k, getArgs(frame, {trim = false, removeBlanks = false}))
end
end
return setmetatable(p, mt)
05da6c4f204e9877c212b3df9fc8bad71389715a
Module:Message box/configuration
828
21
40
39
2023-12-15T14:47:17Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Message box configuration --
-- --
-- This module contains configuration data for [[Module:Message box]]. --
--------------------------------------------------------------------------------
return {
ambox = {
types = {
speedy = {
class = 'ambox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'ambox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
warning = { -- alias for content
class = 'ambox-content',
image = 'OOjs UI icon notice-warning.svg'
},
content = {
class = 'ambox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'ambox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ambox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ambox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ambox-notice',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'notice',
allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
allowSmall = true,
smallParam = 'left',
smallClass = 'mbox-small-left',
substCheck = true,
classes = {'metadata', 'plainlinks', 'ambox'},
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = 'article',
allowMainspaceCategories = true,
templateCategory = 'Article message templates',
templateCategoryRequireName = true,
templateErrorCategory = nil,
templateErrorParamsToCheck = {'issue', 'fix', 'subst'}
},
cmbox = {
types = {
speedy = {
class = 'cmbox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'cmbox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
content = {
class = 'cmbox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'cmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'cmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'cmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'cmbox-notice',
image = 'OOjs UI icon information-progressive.svg'
},
caution = {
class = 'cmbox-style',
image = 'Ambox warning yellow.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'plainlinks', 'cmbox'},
imageEmptyCell = true
},
fmbox = {
types = {
warning = {
class = 'fmbox-warning',
image = 'OOjs UI icon clock-destructive.svg'
},
editnotice = {
class = 'fmbox-editnotice',
image = 'OOjs UI icon information-progressive.svg'
},
system = {
class = 'fmbox-system',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'system',
showInvalidTypeError = true,
classes = {'plainlinks', 'fmbox'},
imageEmptyCell = false,
imageRightNone = false
},
imbox = {
types = {
speedy = {
class = 'imbox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'imbox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
content = {
class = 'imbox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'imbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'imbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'imbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox-license.svg'
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'imbox'},
usePlainlinksParam = true,
imageEmptyCell = true,
below = true,
templateCategory = 'File message boxes'
},
ombox = {
types = {
speedy = {
class = 'ombox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'ombox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
warning = { -- alias for content
class = 'ombox-content',
image = 'OOjs UI icon notice-warning.svg'
},
content = {
class = 'ombox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'ombox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'ombox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'ombox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'ombox-notice',
image = 'OOjs UI icon information-progressive.svg'
},
critical = {
class = 'mbox-critical',
image = 'OOjs UI icon clock-destructive.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'plainlinks', 'ombox'},
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true
},
tmbox = {
types = {
speedy = {
class = 'tmbox-speedy',
image = 'OOjs UI icon clock-destructive.svg'
},
delete = {
class = 'tmbox-delete',
image = 'OOjs UI icon alert-destructive.svg'
},
content = {
class = 'tmbox-content',
image = 'OOjs UI icon notice-warning.svg'
},
style = {
class = 'tmbox-style',
image = 'Edit-clear.svg'
},
move = {
class = 'tmbox-move',
image = 'Merge-split-transwiki default.svg'
},
protection = {
class = 'tmbox-protection',
image = 'Semi-protection-shackle-keyhole.svg'
},
notice = {
class = 'tmbox-notice',
image = 'OOjs UI icon information-progressive.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'plainlinks', 'tmbox'},
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = 'Talk message boxes'
}
}
47b6480268da53e29e5a36e44330750ddb2daab5
Module:Message box/ombox.css
828
22
42
41
2023-12-15T14:47:18Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
sanitized-css
text/css
/**
* {{ombox}} (other pages message box) styles
*
* @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css
* @revision 2021-07-15
*/
table.ombox {
margin: 4px 10%;
border-collapse: collapse;
/* Default "notice" gray */
border: 1px solid #a2a9b1;
background-color: #f8f9fa;
box-sizing: border-box;
}
/* An empty narrow cell */
.ombox td.mbox-empty-cell {
border: none;
padding: 0;
width: 1px;
}
/* The message body cell(s) */
.ombox th.mbox-text,
.ombox td.mbox-text {
border: none;
/* 0.9em left/right */
padding: 0.25em 0.9em;
/* Make all mboxes the same width regardless of text length */
width: 100%;
}
/* The left image cell */
.ombox td.mbox-image {
border: none;
text-align: center;
/* 0.9em left, 0px right */
/* @noflip */
padding: 2px 0 2px 0.9em;
}
/* The right image cell */
.ombox td.mbox-imageright {
border: none;
text-align: center;
/* 0px left, 0.9em right */
/* @noflip */
padding: 2px 0.9em 2px 0;
}
table.ombox-notice {
/* Gray */
border-color: #a2a9b1;
}
table.ombox-speedy {
/* Pink */
background-color: #fee7e6;
}
table.ombox-speedy,
table.ombox-delete {
/* Red */
border-color: #b32424;
border-width: 2px;
}
table.ombox-content {
/* Orange */
border-color: #f28500;
}
table.ombox-style {
/* Yellow */
border-color: #fc3;
}
table.ombox-move {
/* Purple */
border-color: #9932cc;
}
table.ombox-protection {
/* Gray-gold */
border-color: #a2a9b1;
border-width: 2px;
}
/**
* {{ombox|small=1}} styles
*
* These ".mbox-small" classes must be placed after all other
* ".ombox" classes. "html body.mediawiki .ombox"
* is so they apply only to other page message boxes.
*
* @source https://www.mediawiki.org/wiki/MediaWiki:Gadget-enwp-boxes.css
* @revision 2021-07-15
*/
/* For the "small=yes" option. */
html body.mediawiki .ombox.mbox-small {
clear: right;
float: right;
margin: 4px 0 4px 1em;
box-sizing: border-box;
width: 238px;
font-size: 88%;
line-height: 1.25em;
}
e2c21da9b2e5ea3a68e2f5a7432cbfd3cfce80a8
Module:Navbar
828
23
44
43
2023-12-15T14:47:18Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
local p = {}
local getArgs
local ul
function p.addItem (mini, full, link, descrip, args, url)
local l
if url then
l = {'[', '', ']'}
else
l = {'[[', '|', ']]'}
end
ul:tag('li')
:addClass('nv-'..full)
:wikitext(l[1] .. link .. l[2])
:tag(args.mini and 'abbr' or 'span')
:attr('title', descrip..' this template')
:cssText(args.fontstyle)
:wikitext(args.mini and mini or full)
:done()
:wikitext(l[3])
end
function p.brackets (position, c, args, div)
if args.brackets then
div
:tag('span')
:css('margin-'..position, '-0.125em')
:cssText(args.fontstyle)
:wikitext(c)
end
end
function p._navbar(args)
local show = {true, true, true, false, false, false}
local titleArg = 1
if args.collapsible then
titleArg = 2
if not args.plain then args.mini = 1 end
if args.fontcolor then
args.fontstyle = 'color:' .. args.fontcolor .. ';'
end
args.style = 'float:left; text-align:left'
end
if args.template then
titleArg = 'template'
show = {true, false, false, false, false, false}
local index = {t = 2, d = 2, e = 3, h = 4, m = 5, w = 6, talk = 2, edit = 3, hist = 4, move = 5, watch = 6}
for k,v in ipairs(require ('Module:TableTools').compressSparseArray(args)) do
local num = index[v]
if num then show[num] = true end
end
end
if args.noedit then show[3] = false end
local titleText = args[titleArg] or (':' .. mw.getCurrentFrame():getParent():getTitle())
local title = mw.title.new(mw.text.trim(titleText), 'Template')
if not title then
error('Invalid title ' .. titleText)
end
local talkpage = title.talkPageTitle and title.talkPageTitle.fullText or ''
local div = mw.html.create():tag('div')
div
:addClass('plainlinks')
:addClass('hlist')
:addClass('navbar')
:cssText(args.style)
if args.mini then div:addClass('mini') end
if not (args.mini or args.plain) then
div
:tag('span')
:css('word-spacing', 0)
:cssText(args.fontstyle)
:wikitext(args.text or 'This box:')
:wikitext(' ')
end
p.brackets('right', '[ ', args, div)
ul = div:tag('ul')
if show[1] then p.addItem('v', 'view', title.fullText, 'View', args) end
if show[2] then p.addItem('t', 'talk', talkpage, 'Discuss', args) end
if show[3] then p.addItem('e', 'edit', title:fullUrl('action=edit'), 'Edit', args, true) end
if show[4] then p.addItem('h', 'hist', title:fullUrl('action=history'), 'History of', args, true) end
if show[5] then
local move = mw.title.new ('Special:Movepage')
p.addItem('m', 'move', move:fullUrl('target='..title.fullText), 'Move', args, true) end
if show[6] then p.addItem('w', 'watch', title:fullUrl('action=watch'), 'Watch', args, true) end
p.brackets('left', ' ]', args, div)
if args.collapsible then
div
:done()
:tag('div')
:css('font-size', '114%')
:css('margin', args.mini and '0 4em' or '0 7em')
:cssText(args.fontstyle)
:wikitext(args[1])
end
-- DELIBERATE DELTA FROM EN.WP THAT INTEGRATES HLIST TSTYLES
-- CARE WHEN SYNCING
local frame = mw.getCurrentFrame()
return frame:extensionTag{
name = 'templatestyles', args = { src = 'Flatlist/styles.css' }
} .. frame:extensionTag{
name = 'templatestyles', args = { src = 'Module:Navbar/styles.css' }
} .. tostring(div:done())
end
function p.navbar(frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
return p._navbar(getArgs(frame))
end
return p
b074bbe764eb1a5909241d11390e2612477d429a
Module:Navbox
828
24
46
45
2023-12-15T14:47:19Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
--
-- This module implements {{Navbox}}
--
local p = {}
local navbar = require('Module:Navbar')._navbar
local getArgs -- lazily initialized
local args
local border
local listnums
local ODD_EVEN_MARKER = '\127_ODDEVEN_\127'
local RESTART_MARKER = '\127_ODDEVEN0_\127'
local REGEX_MARKER = '\127_ODDEVEN(%d?)_\127'
local function striped(wikitext)
-- Return wikitext with markers replaced for odd/even striping.
-- Child (subgroup) navboxes are flagged with a category that is removed
-- by parent navboxes. The result is that the category shows all pages
-- where a child navbox is not contained in a parent navbox.
local orphanCat = '[[Category:Navbox orphans]]'
if border == 'subgroup' and args.orphan ~= 'yes' then
-- No change; striping occurs in outermost navbox.
return wikitext .. orphanCat
end
local first, second = 'odd', 'even'
if args.evenodd then
if args.evenodd == 'swap' then
first, second = second, first
else
first = args.evenodd
second = first
end
end
local changer
if first == second then
changer = first
else
local index = 0
changer = function (code)
if code == '0' then
-- Current occurrence is for a group before a nested table.
-- Set it to first as a valid although pointless class.
-- The next occurrence will be the first row after a title
-- in a subgroup and will also be first.
index = 0
return first
end
index = index + 1
return index % 2 == 1 and first or second
end
end
local regex = orphanCat:gsub('([%[%]])', '%%%1')
return (wikitext:gsub(regex, ''):gsub(REGEX_MARKER, changer)) -- () omits gsub count
end
local function processItem(item, nowrapitems)
if item:sub(1, 2) == '{|' then
-- Applying nowrap to lines in a table does not make sense.
-- Add newlines to compensate for trim of x in |parm=x in a template.
return '\n' .. item ..'\n'
end
if nowrapitems == 'yes' then
local lines = {}
for line in (item .. '\n'):gmatch('([^\n]*)\n') do
local prefix, content = line:match('^([*:;#]+)%s*(.*)')
if prefix and not content:match('^<span class="nowrap">') then
line = prefix .. '<span class="nowrap">' .. content .. '</span>'
end
table.insert(lines, line)
end
item = table.concat(lines, '\n')
end
if item:match('^[*:;#]') then
return '\n' .. item ..'\n'
end
return item
end
-- Separate function so that we can evaluate properly whether hlist should
-- be added by the module
local function has_navbar()
return args.navbar ~= 'off' and args.navbar ~= 'plain' and not
(not args.name and mw.getCurrentFrame():getParent():getTitle():gsub('/sandbox$', '') == 'Template:Navbox')
end
local function renderNavBar(titleCell)
if has_navbar() then
titleCell:wikitext(navbar{
args.name,
-- we depend on this being mini = 1 when the navbox module decides
-- to add hlist templatestyles. we also depend on navbar outputting
-- a copy of the hlist templatestyles.
mini = 1,
fontstyle = (args.basestyle or '') .. ';' .. (args.titlestyle or '') .. ';background:none transparent;border:none;box-shadow:none; padding:0;'
})
end
end
--
-- Title row
--
local function renderTitleRow(tbl)
if not args.title then return end
local titleRow = tbl:tag('tr')
if args.titlegroup then
titleRow
:tag('th')
:attr('scope', 'row')
:addClass('navbox-group')
:addClass(args.titlegroupclass)
:cssText(args.basestyle)
:cssText(args.groupstyle)
:cssText(args.titlegroupstyle)
:wikitext(args.titlegroup)
end
local titleCell = titleRow:tag('th'):attr('scope', 'col')
if args.titlegroup then
titleCell
:addClass('navbox-title1')
end
local titleColspan = 2
if args.imageleft then titleColspan = titleColspan + 1 end
if args.image then titleColspan = titleColspan + 1 end
if args.titlegroup then titleColspan = titleColspan - 1 end
titleCell
:cssText(args.basestyle)
:cssText(args.titlestyle)
:addClass('navbox-title')
:attr('colspan', titleColspan)
renderNavBar(titleCell)
titleCell
:tag('div')
-- id for aria-labelledby attribute
:attr('id', mw.uri.anchorEncode(args.title))
:addClass(args.titleclass)
:css('font-size', '114%')
:css('margin', '0 4em')
:wikitext(processItem(args.title))
end
--
-- Above/Below rows
--
local function getAboveBelowColspan()
local ret = 2
if args.imageleft then ret = ret + 1 end
if args.image then ret = ret + 1 end
return ret
end
local function renderAboveRow(tbl)
if not args.above then return end
tbl:tag('tr')
:tag('td')
:addClass('navbox-abovebelow')
:addClass(args.aboveclass)
:cssText(args.basestyle)
:cssText(args.abovestyle)
:attr('colspan', getAboveBelowColspan())
:tag('div')
-- id for aria-labelledby attribute, if no title
:attr('id', args.title and nil or mw.uri.anchorEncode(args.above))
:wikitext(processItem(args.above, args.nowrapitems))
end
local function renderBelowRow(tbl)
if not args.below then return end
tbl:tag('tr')
:tag('td')
:addClass('navbox-abovebelow')
:addClass(args.belowclass)
:cssText(args.basestyle)
:cssText(args.belowstyle)
:attr('colspan', getAboveBelowColspan())
:tag('div')
:wikitext(processItem(args.below, args.nowrapitems))
end
--
-- List rows
--
local function renderListRow(tbl, index, listnum)
local row = tbl:tag('tr')
if index == 1 and args.imageleft then
row
:tag('td')
:addClass('navbox-image')
:addClass(args.imageclass)
:css('width', '1px') -- Minimize width
:css('padding', '0px 2px 0px 0px')
:cssText(args.imageleftstyle)
:attr('rowspan', #listnums)
:tag('div')
:wikitext(processItem(args.imageleft))
end
if args['group' .. listnum] then
local groupCell = row:tag('th')
-- id for aria-labelledby attribute, if lone group with no title or above
if listnum == 1 and not (args.title or args.above or args.group2) then
groupCell
:attr('id', mw.uri.anchorEncode(args.group1))
end
groupCell
:attr('scope', 'row')
:addClass('navbox-group')
:addClass(args.groupclass)
:cssText(args.basestyle)
:css('width', args.groupwidth or '1%') -- If groupwidth not specified, minimize width
groupCell
:cssText(args.groupstyle)
:cssText(args['group' .. listnum .. 'style'])
:wikitext(args['group' .. listnum])
end
local listCell = row:tag('td')
if args['group' .. listnum] then
listCell
:addClass('navbox-list1')
else
listCell:attr('colspan', 2)
end
if not args.groupwidth then
listCell:css('width', '100%')
end
local rowstyle -- usually nil so cssText(rowstyle) usually adds nothing
if index % 2 == 1 then
rowstyle = args.oddstyle
else
rowstyle = args.evenstyle
end
local listText = args['list' .. listnum]
local oddEven = ODD_EVEN_MARKER
if listText:sub(1, 12) == '</div><table' then
-- Assume list text is for a subgroup navbox so no automatic striping for this row.
oddEven = listText:find('<th[^>]*"navbox%-title"') and RESTART_MARKER or 'odd'
end
listCell
:css('padding', '0px')
:cssText(args.liststyle)
:cssText(rowstyle)
:cssText(args['list' .. listnum .. 'style'])
:addClass('navbox-list')
:addClass('navbox-' .. oddEven)
:addClass(args.listclass)
:addClass(args['list' .. listnum .. 'class'])
:tag('div')
:css('padding', (index == 1 and args.list1padding) or args.listpadding or '0em 0.25em')
:wikitext(processItem(listText, args.nowrapitems))
if index == 1 and args.image then
row
:tag('td')
:addClass('navbox-image')
:addClass(args.imageclass)
:css('width', '1px') -- Minimize width
:css('padding', '0px 0px 0px 2px')
:cssText(args.imagestyle)
:attr('rowspan', #listnums)
:tag('div')
:wikitext(processItem(args.image))
end
end
--
-- Tracking categories
--
local function needsHorizontalLists()
if border == 'subgroup' or args.tracking == 'no' then
return false
end
local listClasses = {
['plainlist'] = true, ['hlist'] = true, ['hlist hnum'] = true,
['hlist hwrap'] = true, ['hlist vcard'] = true, ['vcard hlist'] = true,
['hlist vevent'] = true,
}
return not (listClasses[args.listclass] or listClasses[args.bodyclass])
end
-- there are a lot of list classes in the wild, so we have a function to find
-- them and add their TemplateStyles
local function addListStyles()
local frame = mw.getCurrentFrame()
-- TODO?: Should maybe take a table of classes for e.g. hnum, hwrap as above
-- I'm going to do the stupid thing first though
-- Also not sure hnum and hwrap are going to live in the same TemplateStyles
-- as hlist
local function _addListStyles(htmlclass, templatestyles)
local class_args = { -- rough order of probability of use
'bodyclass', 'listclass', 'aboveclass', 'belowclass', 'titleclass',
'navboxclass', 'groupclass', 'titlegroupclass', 'imageclass'
}
local patterns = {
'^' .. htmlclass .. '$',
'%s' .. htmlclass .. '$',
'^' .. htmlclass .. '%s',
'%s' .. htmlclass .. '%s'
}
local found = false
for _, arg in ipairs(class_args) do
for _, pattern in ipairs(patterns) do
if mw.ustring.find(args[arg] or '', pattern) then
found = true
break
end
end
if found then break end
end
if found then
return frame:extensionTag{
name = 'templatestyles', args = { src = templatestyles }
}
else
return ''
end
end
local hlist_styles = ''
-- navbar always has mini = 1, so here (on this wiki) we can assume that
-- we don't need to output hlist styles in navbox again.
if not has_navbar() then
hlist_styles = _addListStyles('hlist', 'Flatlist/styles.css')
end
local plainlist_styles = _addListStyles('plainlist', 'Plainlist/styles.css')
return hlist_styles .. plainlist_styles
end
local function hasBackgroundColors()
for _, key in ipairs({'titlestyle', 'groupstyle', 'basestyle', 'abovestyle', 'belowstyle'}) do
if tostring(args[key]):find('background', 1, true) then
return true
end
end
end
local function hasBorders()
for _, key in ipairs({'groupstyle', 'basestyle', 'abovestyle', 'belowstyle'}) do
if tostring(args[key]):find('border', 1, true) then
return true
end
end
end
local function isIllegible()
-- require('Module:Color contrast') absent on mediawiki.org
return false
end
local function getTrackingCategories()
local cats = {}
if needsHorizontalLists() then table.insert(cats, 'Navigational boxes without horizontal lists') end
if hasBackgroundColors() then table.insert(cats, 'Navboxes using background colours') end
if isIllegible() then table.insert(cats, 'Potentially illegible navboxes') end
if hasBorders() then table.insert(cats, 'Navboxes using borders') end
return cats
end
local function renderTrackingCategories(builder)
local title = mw.title.getCurrentTitle()
if title.namespace ~= 10 then return end -- not in template space
local subpage = title.subpageText
if subpage == 'doc' or subpage == 'sandbox' or subpage == 'testcases' then return end
for _, cat in ipairs(getTrackingCategories()) do
builder:wikitext('[[Category:' .. cat .. ']]')
end
end
--
-- Main navbox tables
--
local function renderMainTable()
local tbl = mw.html.create('table')
:addClass('nowraplinks')
:addClass(args.bodyclass)
if args.title and (args.state ~= 'plain' and args.state ~= 'off') then
if args.state == 'collapsed' then args.state = 'mw-collapsed' end
tbl
:addClass('mw-collapsible')
:addClass(args.state or 'autocollapse')
end
tbl:css('border-spacing', 0)
if border == 'subgroup' or border == 'none' then
tbl
:addClass('navbox-subgroup')
:cssText(args.bodystyle)
:cssText(args.style)
else -- regular navbox - bodystyle and style will be applied to the wrapper table
tbl
:addClass('navbox-inner')
:css('background', 'transparent')
:css('color', 'inherit')
end
tbl:cssText(args.innerstyle)
renderTitleRow(tbl)
renderAboveRow(tbl)
for i, listnum in ipairs(listnums) do
renderListRow(tbl, i, listnum)
end
renderBelowRow(tbl)
return tbl
end
function p._navbox(navboxArgs)
args = navboxArgs
listnums = {}
for k, _ in pairs(args) do
if type(k) == 'string' then
local listnum = k:match('^list(%d+)$')
if listnum then table.insert(listnums, tonumber(listnum)) end
end
end
table.sort(listnums)
border = mw.text.trim(args.border or args[1] or '')
if border == 'child' then
border = 'subgroup'
end
-- render the main body of the navbox
local tbl = renderMainTable()
-- get templatestyles
local frame = mw.getCurrentFrame()
local base_templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = 'Module:Navbox/styles.css' }
}
local templatestyles = ''
if args.templatestyles and args.templatestyles ~= '' then
templatestyles = frame:extensionTag{
name = 'templatestyles', args = { src = args.templatestyles }
}
end
local res = mw.html.create()
-- 'navbox-styles' exists for two reasons:
-- 1. To wrap the styles to work around phab: T200206 more elegantly. Instead
-- of combinatorial rules, this ends up being linear number of CSS rules.
-- 2. To allow MobileFrontend to rip the styles out with 'nomobile' such that
-- they are not dumped into the mobile view.
res:tag('div')
:addClass('navbox-styles')
:addClass('nomobile')
:wikitext(base_templatestyles .. templatestyles)
:done()
-- render the appropriate wrapper around the navbox, depending on the border param
if border == 'none' then
local nav = res:tag('div')
:attr('role', 'navigation')
:wikitext(addListStyles())
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args.title or args.above or (args.group1 and not args.group2) then
nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title or args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
end
elseif border == 'subgroup' then
-- We assume that this navbox is being rendered in a list cell of a
-- parent navbox, and is therefore inside a div with padding:0em 0.25em.
-- We start with a </div> to avoid the padding being applied, and at the
-- end add a <div> to balance out the parent's </div>
res
:wikitext('</div>')
:wikitext(addListStyles())
:node(tbl)
:wikitext('<div>')
else
local nav = res:tag('div')
:attr('role', 'navigation')
:addClass('navbox')
:addClass(args.navboxclass)
:cssText(args.bodystyle)
:cssText(args.style)
:css('padding', '3px')
:wikitext(addListStyles())
:node(tbl)
-- aria-labelledby title, otherwise above, otherwise lone group
if args.title or args.above or (args.group1 and not args.group2) then
nav:attr('aria-labelledby', mw.uri.anchorEncode(args.title or args.above or args.group1))
else
nav:attr('aria-label', 'Navbox')
end
end
if (args.nocat or 'false'):lower() == 'false' then
renderTrackingCategories(res)
end
return striped(tostring(res))
end
function p.navbox(frame)
if not getArgs then
getArgs = require('Module:Arguments').getArgs
end
args = getArgs(frame, {wrappers = {'Template:Navbox', 'Template:Navbox subgroup'}})
if frame.args.border then
-- This allows Template:Navbox_subgroup to use {{#invoke:Navbox|navbox|border=...}}.
args.border = frame.args.border
end
-- Read the arguments in the order they'll be output in, to make references number in the right order.
local _
_ = args.title
_ = args.above
for i = 1, 20 do
_ = args["group" .. tostring(i)]
_ = args["list" .. tostring(i)]
end
_ = args.below
return p._navbox(args)
end
return p
c0c6a393f9e4e6bc23da95a76f9023013170e3c9
Module:Navbox/styles.css
828
25
48
47
2023-12-15T14:47:19Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
sanitized-css
text/css
.navbox {
border: 1px solid #aaa;
box-sizing: border-box;
width: 100%;
margin: auto;
clear: both;
font-size: 88%;
text-align: center;
padding: 1px;
}
.navbox-inner,
.navbox-subgroup {
width: 100%;
}
.navbox + .navbox-styles + .navbox {
/* Single pixel border between adjacent navboxes */
margin-top: -1px;
}
.navbox th,
.navbox-title,
.navbox-abovebelow {
text-align: center;
/* Title and above/below styles */
padding-left: 1em;
padding-right: 1em;
}
th.navbox-group {
/* Group style */
white-space: nowrap;
/* @noflip */
text-align: right;
}
.navbox,
.navbox-subgroup {
background: #fdfdfd;
}
.navbox-list {
/* Must match background color */
border-color: #fdfdfd;
}
.navbox th,
.navbox-title {
/* Level 1 color */
background: #eaeeff;
}
.navbox-abovebelow,
th.navbox-group,
.navbox-subgroup .navbox-title {
/* Level 2 color */
background: #ddddff;
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
/* Level 3 color */
background: #e6e6ff;
}
.navbox-even {
/* Even row striping */
background: #f7f7f7;
}
.navbox-odd {
/* Odd row striping */
background: transparent;
}
th.navbox-title1 {
border-left: 2px solid #fdfdfd;
width: 100%;
}
td.navbox-list1 {
text-align: left;
border-left-width: 2px;
border-left-style: solid;
}
.navbox .hlist td dl,
.navbox .hlist td ol,
.navbox .hlist td ul,
.navbox td.hlist dl,
.navbox td.hlist ol,
.navbox td.hlist ul {
/* Adjust hlist padding in navboxes */
padding: 0.125em 0;
}
.navbox .hlist dd,
.navbox .hlist dt,
.navbox .hlist li {
/* Nowrap list items in navboxes */
white-space: nowrap;
}
.navbox .hlist dd dl,
.navbox .hlist dt dl,
.navbox .hlist li ol,
.navbox .hlist li ul {
/* But allow parent list items to be wrapped */
white-space: normal;
}
ol + .navbox-styles + .navbox,
ul + .navbox-styles + .navbox {
/* Prevent lists from clinging to navboxes */
margin-top: 0.5em;
}
c4c305dae15bacc8c3240430775fab74f0c10e06
Module:TNT
828
26
50
49
2023-12-15T14:47:20Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
--
-- INTRO: (!!! DO NOT RENAME THIS PAGE !!!)
-- This module allows any template or module to be copy/pasted between
-- wikis without any translation changes. All translation text is stored
-- in the global Data:*.tab pages on Commons, and used everywhere.
--
-- SEE: https://www.mediawiki.org/wiki/Multilingual_Templates_and_Modules
--
-- ATTENTION:
-- Please do NOT rename this module - it has to be identical on all wikis.
-- This code is maintained at https://www.mediawiki.org/wiki/Module:TNT
-- Please do not modify it anywhere else, as it may get copied and override your changes.
-- Suggestions can be made at https://www.mediawiki.org/wiki/Module_talk:TNT
--
-- DESCRIPTION:
-- The "msg" function uses a Commons dataset to translate a message
-- with a given key (e.g. source-table), plus optional arguments
-- to the wiki markup in the current content language.
-- Use lang=xx to set language. Example:
--
-- {{#invoke:TNT | msg
-- | I18n/Template:Graphs.tab <!-- https://commons.wikimedia.org/wiki/Data:I18n/Template:Graphs.tab -->
-- | source-table <!-- uses a translation message with id = "source-table" -->
-- | param1 }} <!-- optional parameter -->
--
--
-- The "doc" function will generate the <templatedata> parameter documentation for templates.
-- This way all template parameters can be stored and localized in a single Commons dataset.
-- NOTE: "doc" assumes that all documentation is located in Data:Templatedata/* on Commons.
--
-- {{#invoke:TNT | doc | Graph:Lines }}
-- uses https://commons.wikimedia.org/wiki/Data:Templatedata/Graph:Lines.tab
-- if the current page is Template:Graph:Lines/doc
--
local p = {}
local i18nDataset = 'I18n/Module:TNT.tab'
-- Forward declaration of the local functions
local sanitizeDataset, loadData, link, formatMessage
function p.msg(frame)
local dataset, id
local params = {}
local lang = nil
for k, v in pairs(frame.args) do
if k == 1 then
dataset = mw.text.trim(v)
elseif k == 2 then
id = mw.text.trim(v)
elseif type(k) == 'number' then
params[k - 2] = mw.text.trim(v)
elseif k == 'lang' and v ~= '_' then
lang = mw.text.trim(v)
end
end
return formatMessage(dataset, id, params, lang)
end
-- Identical to p.msg() above, but used from other lua modules
-- Parameters: name of dataset, message key, optional arguments
-- Example with 2 params: format('I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset')
function p.format(dataset, key, ...)
local checkType = require('libraryUtil').checkType
checkType('format', 1, dataset, 'string')
checkType('format', 2, key, 'string')
return formatMessage(dataset, key, {...})
end
-- Identical to p.msg() above, but used from other lua modules with the language param
-- Parameters: language code, name of dataset, message key, optional arguments
-- Example with 2 params: formatInLanguage('es', I18n/Module:TNT', 'error_bad_msgkey', 'my-key', 'my-dataset')
function p.formatInLanguage(lang, dataset, key, ...)
local checkType = require('libraryUtil').checkType
checkType('formatInLanguage', 1, lang, 'string')
checkType('formatInLanguage', 2, dataset, 'string')
checkType('formatInLanguage', 3, key, 'string')
return formatMessage(dataset, key, {...}, lang)
end
-- Obsolete function that adds a 'c:' prefix to the first param.
-- "Sandbox/Sample.tab" -> 'c:Data:Sandbox/Sample.tab'
function p.link(frame)
return link(frame.args[1])
end
function p.doc(frame)
local dataset = 'Templatedata/' .. sanitizeDataset(frame.args[1])
return frame:extensionTag('templatedata', p.getTemplateData(dataset)) ..
formatMessage(i18nDataset, 'edit_doc', {link(dataset)})
end
function p.getTemplateData(dataset)
-- TODO: add '_' parameter once lua starts reindexing properly for "all" languages
local data = loadData(dataset)
local names = {}
for _, field in ipairs(data.schema.fields) do
table.insert(names, field.name)
end
local numOnly = true
local params = {}
local paramOrder = {}
for _, row in ipairs(data.data) do
local newVal = {}
local name = nil
for pos, columnName in ipairs(names) do
if columnName == 'name' then
name = row[pos]
else
newVal[columnName] = row[pos]
end
end
if name then
if (
(type(name) ~= "number")
and (
(type(name) ~= "string")
or not string.match(name, "^%d+$")
)
) then
numOnly = false
end
params[name] = newVal
table.insert(paramOrder, name)
end
end
-- Work around json encoding treating {"1":{...}} as an [{...}]
if numOnly then
params['zzz123']=''
end
local json = mw.text.jsonEncode({
params=params,
paramOrder=paramOrder,
description=data.description,
})
if numOnly then
json = string.gsub(json,'"zzz123":"",?', "")
end
return json
end
-- Local functions
sanitizeDataset = function(dataset)
if not dataset then
return nil
end
dataset = mw.text.trim(dataset)
if dataset == '' then
return nil
elseif string.sub(dataset,-4) ~= '.tab' then
return dataset .. '.tab'
else
return dataset
end
end
loadData = function(dataset, lang)
dataset = sanitizeDataset(dataset)
if not dataset then
error(formatMessage(i18nDataset, 'error_no_dataset', {}))
end
-- Give helpful error to thirdparties who try and copy this module.
if not mw.ext or not mw.ext.data or not mw.ext.data.get then
error(string.format([['''Missing JsonConfig extension, or not properly configured;
Cannot load https://commons.wikimedia.org/wiki/Data:%s.
See https://www.mediawiki.org/wiki/Extension:JsonConfig#Supporting_Wikimedia_templates''']], dataset))
end
local data = mw.ext.data.get(dataset, lang)
if data == false then
if dataset == i18nDataset then
-- Prevent cyclical calls
error('Missing Commons dataset ' .. i18nDataset)
else
error(formatMessage(i18nDataset, 'error_bad_dataset', {link(dataset)}))
end
end
return data
end
-- Given a dataset name, convert it to a title with the 'commons:data:' prefix
link = function(dataset)
return 'c:Data:' .. mw.text.trim(dataset or '')
end
formatMessage = function(dataset, key, params, lang)
for _, row in pairs(loadData(dataset, lang).data) do
local id, msg = unpack(row)
if id == key then
local result = mw.message.newRawMessage(msg, unpack(params or {}))
return result:plain()
end
end
if dataset == i18nDataset then
-- Prevent cyclical calls
error('Invalid message key "' .. key .. '"')
else
error(formatMessage(i18nDataset, 'error_bad_msgkey', {key, link(dataset)}))
end
end
return p
e8ec673cd9d57a37a2bc326979c7980f1657fc3a
Module:TableTools
828
27
52
51
2023-12-15T14:47:21Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
--[[
------------------------------------------------------------------------------------
-- TableTools --
-- --
-- This module includes a number of functions for dealing with Lua tables. --
-- It is a meta-module, meant to be called from other Lua modules, and should --
-- not be called directly from #invoke. --
------------------------------------------------------------------------------------
--]]
local libraryUtil = require('libraryUtil')
local p = {}
-- Define often-used variables and functions.
local floor = math.floor
local infinity = math.huge
local checkType = libraryUtil.checkType
local checkTypeMulti = libraryUtil.checkTypeMulti
--[[
------------------------------------------------------------------------------------
-- isPositiveInteger
--
-- This function returns true if the given value is a positive integer, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a given table key is in the array part or the
-- hash part of a table.
------------------------------------------------------------------------------------
--]]
function p.isPositiveInteger(v)
if type(v) == 'number' and v >= 1 and floor(v) == v and v < infinity then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- isNan
--
-- This function returns true if the given number is a NaN value, and false
-- if not. Although it doesn't operate on tables, it is included here as it is
-- useful for determining whether a value can be a valid table key. Lua will
-- generate an error if a NaN is used as a table key.
------------------------------------------------------------------------------------
--]]
function p.isNan(v)
if type(v) == 'number' and tostring(v) == '-nan' then
return true
else
return false
end
end
--[[
------------------------------------------------------------------------------------
-- shallowClone
--
-- This returns a clone of a table. The value returned is a new table, but all
-- subtables and functions are shared. Metamethods are respected, but the returned
-- table will have no metatable of its own.
------------------------------------------------------------------------------------
--]]
function p.shallowClone(t)
local ret = {}
for k, v in pairs(t) do
ret[k] = v
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- removeDuplicates
--
-- This removes duplicate values from an array. Non-positive-integer keys are
-- ignored. The earliest value is kept, and all subsequent duplicate values are
-- removed, but otherwise the array order is unchanged.
------------------------------------------------------------------------------------
--]]
function p.removeDuplicates(t)
checkType('removeDuplicates', 1, t, 'table')
local isNan = p.isNan
local ret, exists = {}, {}
for i, v in ipairs(t) do
if isNan(v) then
-- NaNs can't be table keys, and they are also unique, so we don't need to check existence.
ret[#ret + 1] = v
else
if not exists[v] then
ret[#ret + 1] = v
exists[v] = true
end
end
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- numKeys
--
-- This takes a table and returns an array containing the numbers of any numerical
-- keys that have non-nil values, sorted in numerical order.
------------------------------------------------------------------------------------
--]]
function p.numKeys(t)
checkType('numKeys', 1, t, 'table')
local isPositiveInteger = p.isPositiveInteger
local nums = {}
for k, v in pairs(t) do
if isPositiveInteger(k) then
nums[#nums + 1] = k
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- affixNums
--
-- This takes a table and returns an array containing the numbers of keys with the
-- specified prefix and suffix. For example, for the table
-- {a1 = 'foo', a3 = 'bar', a6 = 'baz'} and the prefix "a", affixNums will
-- return {1, 3, 6}.
------------------------------------------------------------------------------------
--]]
function p.affixNums(t, prefix, suffix)
checkType('affixNums', 1, t, 'table')
checkType('affixNums', 2, prefix, 'string', true)
checkType('affixNums', 3, suffix, 'string', true)
local function cleanPattern(s)
-- Cleans a pattern so that the magic characters ()%.[]*+-?^$ are interpreted literally.
s = s:gsub('([%(%)%%%.%[%]%*%+%-%?%^%$])', '%%%1')
return s
end
prefix = prefix or ''
suffix = suffix or ''
prefix = cleanPattern(prefix)
suffix = cleanPattern(suffix)
local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'
local nums = {}
for k, v in pairs(t) do
if type(k) == 'string' then
local num = mw.ustring.match(k, pattern)
if num then
nums[#nums + 1] = tonumber(num)
end
end
end
table.sort(nums)
return nums
end
--[[
------------------------------------------------------------------------------------
-- numData
--
-- Given a table with keys like ("foo1", "bar1", "foo2", "baz2"), returns a table
-- of subtables in the format
-- { [1] = {foo = 'text', bar = 'text'}, [2] = {foo = 'text', baz = 'text'} }
-- Keys that don't end with an integer are stored in a subtable named "other".
-- The compress option compresses the table so that it can be iterated over with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.numData(t, compress)
checkType('numData', 1, t, 'table')
checkType('numData', 2, compress, 'boolean', true)
local ret = {}
for k, v in pairs(t) do
local prefix, num = mw.ustring.match(tostring(k), '^([^0-9]*)([1-9][0-9]*)$')
if num then
num = tonumber(num)
local subtable = ret[num] or {}
if prefix == '' then
-- Positional parameters match the blank string; put them at the start of the subtable instead.
prefix = 1
end
subtable[prefix] = v
ret[num] = subtable
else
local subtable = ret.other or {}
subtable[k] = v
ret.other = subtable
end
end
if compress then
local other = ret.other
ret = p.compressSparseArray(ret)
ret.other = other
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- compressSparseArray
--
-- This takes an array with one or more nil values, and removes the nil values
-- while preserving the order, so that the array can be safely traversed with
-- ipairs.
------------------------------------------------------------------------------------
--]]
function p.compressSparseArray(t)
checkType('compressSparseArray', 1, t, 'table')
local ret = {}
local nums = p.numKeys(t)
for _, num in ipairs(nums) do
ret[#ret + 1] = t[num]
end
return ret
end
--[[
------------------------------------------------------------------------------------
-- sparseIpairs
--
-- This is an iterator for sparse arrays. It can be used like ipairs, but can
-- handle nil values.
------------------------------------------------------------------------------------
--]]
function p.sparseIpairs(t)
checkType('sparseIpairs', 1, t, 'table')
local nums = p.numKeys(t)
local i = 0
local lim = #nums
return function ()
i = i + 1
if i <= lim then
local key = nums[i]
return key, t[key]
else
return nil, nil
end
end
end
--[[
------------------------------------------------------------------------------------
-- size
--
-- This returns the size of a key/value pair table. It will also work on arrays,
-- but for arrays it is more efficient to use the # operator.
------------------------------------------------------------------------------------
--]]
function p.size(t)
checkType('size', 1, t, 'table')
local i = 0
for k in pairs(t) do
i = i + 1
end
return i
end
local function defaultKeySort(item1, item2)
-- "number" < "string", so numbers will be sorted before strings.
local type1, type2 = type(item1), type(item2)
if type1 ~= type2 then
return type1 < type2
else -- This will fail with table, boolean, function.
return item1 < item2
end
end
--[[
Returns a list of the keys in a table, sorted using either a default
comparison function or a custom keySort function.
]]
function p.keysToList(t, keySort, checked)
if not checked then
checkType('keysToList', 1, t, 'table')
checkTypeMulti('keysToList', 2, keySort, { 'function', 'boolean', 'nil' })
end
local list = {}
local index = 1
for key, value in pairs(t) do
list[index] = key
index = index + 1
end
if keySort ~= false then
keySort = type(keySort) == 'function' and keySort or defaultKeySort
table.sort(list, keySort)
end
return list
end
--[[
Iterates through a table, with the keys sorted using the keysToList function.
If there are only numerical keys, sparseIpairs is probably more efficient.
]]
function p.sortedPairs(t, keySort)
checkType('sortedPairs', 1, t, 'table')
checkType('sortedPairs', 2, keySort, 'function', true)
local list = p.keysToList(t, keySort, true)
local i = 0
return function()
i = i + 1
local key = list[i]
if key ~= nil then
return key, t[key]
else
return nil, nil
end
end
end
--[[
Returns true if all keys in the table are consecutive integers starting at 1.
--]]
function p.isArray(t)
checkType("isArray", 1, t, "table")
local i = 0
for k, v in pairs(t) do
i = i + 1
if t[i] == nil then
return false
end
end
return true
end
-- { "a", "b", "c" } -> { a = 1, b = 2, c = 3 }
function p.invert(array)
checkType("invert", 1, array, "table")
local map = {}
for i, v in ipairs(array) do
map[v] = i
end
return map
end
--[[
{ "a", "b", "c" } -> { ["a"] = true, ["b"] = true, ["c"] = true }
--]]
function p.listToSet(t)
checkType("listToSet", 1, t, "table")
local set = {}
for _, item in ipairs(t) do
set[item] = true
end
return set
end
--[[
Recursive deep copy function.
Preserves identities of subtables.
]]
local function _deepCopy(orig, includeMetatable, already_seen)
-- Stores copies of tables indexed by the original table.
already_seen = already_seen or {}
local copy = already_seen[orig]
if copy ~= nil then
return copy
end
if type(orig) == 'table' then
copy = {}
for orig_key, orig_value in pairs(orig) do
copy[deepcopy(orig_key, includeMetatable, already_seen)] = deepcopy(orig_value, includeMetatable, already_seen)
end
already_seen[orig] = copy
if includeMetatable then
local mt = getmetatable(orig)
if mt ~= nil then
local mt_copy = deepcopy(mt, includeMetatable, already_seen)
setmetatable(copy, mt_copy)
already_seen[mt] = mt_copy
end
end
else -- number, string, boolean, etc
copy = orig
end
return copy
end
function p.deepCopy(orig, noMetatable, already_seen)
checkType("deepCopy", 3, already_seen, "table", true)
return _deepCopy(orig, not noMetatable, already_seen)
end
--[[
Concatenates all values in the table that are indexed by a number, in order.
sparseConcat{ a, nil, c, d } => "acd"
sparseConcat{ nil, b, c, d } => "bcd"
]]
function p.sparseConcat(t, sep, i, j)
local list = {}
local list_i = 0
for _, v in p.sparseIpairs(t) do
list_i = list_i + 1
list[list_i] = v
end
return table.concat(list, sep, i, j)
end
--[[
-- This returns the length of a table, or the first integer key n counting from
-- 1 such that t[n + 1] is nil. It is similar to the operator #, but may return
-- a different value when there are gaps in the array portion of the table.
-- Intended to be used on data loaded with mw.loadData. For other tables, use #.
-- Note: #frame.args in frame object always be set to 0, regardless of
-- the number of unnamed template parameters, so use this function for
-- frame.args.
--]]
function p.length(t)
local i = 1
while t[i] ~= nil do
i = i + 1
end
return i - 1
end
function p.inArray(arr, valueToFind)
checkType("inArray", 1, arr, "table")
-- if valueToFind is nil, error?
for _, v in ipairs(arr) do
if v == valueToFind then
return true
end
end
return false
end
return p
fe918509f168332267834b3a6f5c219a9de5b2e7
Module:Yesno
828
28
54
53
2023-12-15T14:47:21Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
return function (val, default)
-- If your wiki uses non-ascii characters for any of "yes", "no", etc., you
-- should replace "val:lower()" with "mw.ustring.lower(val)" in the
-- following line.
val = type(val) == 'string' and val:lower() or val
if val == nil then
return nil
elseif val == true
or val == 'yes'
or val == 'y'
or val == 'true'
or val == 't'
or val == 'on'
or tonumber(val) == 1
then
return true
elseif val == false
or val == 'no'
or val == 'n'
or val == 'false'
or val == 'f'
or val == 'off'
or tonumber(val) == 0
then
return false
else
return default
end
end
f767643e7d12126d020d88d662a3dd057817b9dc
Template:Documentation
10
29
56
55
2023-12-15T14:47:22Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude><includeonly>{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}</includeonly><noinclude>
{{documentation|content=
{{Lua|Module:Documentation}}
<translate><!--T:12--> This template automatically displays a documentation box like the one you are seeing now, of which the content is sometimes transcluded from another page.</translate>
<translate><!--T:13--> It is intended for pages which are [[<tvar name=1>Special:MyLanguage/Help:Transclusion</tvar>|transcluded]] in other pages, i.e. templates, whether in the template namespace or not.</translate>
<translate>
==Usage== <!--T:2-->
===Customising display=== <!--T:3-->
<!--T:4-->
Overrides exist to customise the output in special cases:
</translate>
* <nowiki>{{</nowiki>documentation{{!}}'''heading'''=<nowiki>}}</nowiki> - <translate><!--T:5--> change the text of the "documentation" heading.</translate> <translate><!--T:10--> If this is set to blank, the entire heading line (including the first [edit] link) will also disappear.</translate>
<translate>
==Rationale== <!--T:6-->
</translate>
<translate><!--T:7--> This template allows any page to use any documentation page, and makes it possible to protect templates while allowing anyone to edit the template's documentation and categories.</translate>
<translate><!--T:8--> It also reduces server resources by circumventing a [[w:Wikipedia:Template limits|technical limitation of templates]] (see a [[<tvar name=1>:en:Special:Diff/69888944</tvar>|developer's explanation]]).</translate>
<translate>
==See also== <!--T:9-->
</translate>
* <translate><!--T:14--> [[w:Template:Documentation subpage]]</translate>
* {{tim|Documentation}}
* <translate><!--T:11--> [[w:Wikipedia:Template documentation]]</translate>
}}
[[Category:Formatting templates{{#translation:}}|Template documentation]]
[[Category:Template documentation{{#translation:}}| ]]
</noinclude><includeonly>{{#if:{{{content|}}}|
[[Category:Template documentation pages{{#translation:}}]]
}}</includeonly>
c1ef6cbf9cb4c65ddd087c09aa6affb00dc5bfad
Template:Lua
10
30
58
57
2023-12-15T14:47:23Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
wikitext
text/x-wiki
<onlyinclude><includeonly>{{#invoke:Lua banner|main}}</includeonly></onlyinclude>
{{Lua|Module:Lua banner}}
{{Documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
4642b0a145984533bddd3a6f0293c56ce201b88d
Template:Module other
10
31
60
59
2023-12-15T14:47:23Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
wikitext
text/x-wiki
{{#switch:
<!--If no or empty "demospace" parameter then detect namespace-->
{{#if:{{{demospace|}}}
| {{lc: {{{demospace}}} }} <!--Use lower case "demospace"-->
| {{#ifeq:{{NAMESPACE}}|{{ns:Module}}
| module
| other
}}
}}
| module = {{{1|}}}
| other
| #default = {{{2|}}}
}}<!--End switch--><noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
5a2444103b3cffc028f4dc0de2e8a278f87c7129
Template:Navbox
10
32
62
61
2023-12-15T14:47:24Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
wikitext
text/x-wiki
<includeonly>{{#invoke:Navbox|navbox}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
fe9b964401f895918ee4fe078678f1722a3c41ec
Template:Pp-template
10
33
64
63
2023-12-15T14:47:24Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
wikitext
text/x-wiki
<includeonly>{{#switch:{{#invoke:Effective protection level|edit|{{FULLPAGENAME}}}}
|*=[[Category:Pages with incorrect protection templates]]
|autoconfirmed={{#tag:indicator|[[File:Semi-protection-shackle-no-text.svg|20px|link=Project:Protected page|alt=Permanently protected {{module other|module|template}}|This high-risk {{module other|module|template}} is permanently semi-protected to prevent vandalism]]|name="pp-default"}}[[Category:{{module other|Modules subject to page protection|Semi-protected templates}}|{{PAGENAME}}]]
|sysop={{#tag:indicator|[[File:Full-protection-shackle-no-text.svg|20px|link=Project:Protected page|alt=Permanently protected {{module other|module|template}}|This high-risk {{module other|module|template}} is permanently protected to prevent vandalism]]|name="pp-default"}}[[Category:{{module other|Modules subject to page protection|Fully protected templates}}|{{PAGENAME}}]]
}}</includeonly><noinclude>
{{Documentation}}
</noinclude>
1046e139e5a0380698fd75d7207e9ef53a4ff91d
Template:Tim
10
34
66
65
2023-12-15T14:47:24Z
HyperNervie
2
1 revision imported: Imported from mediwiki.org
wikitext
text/x-wiki
[[m:Template:{{{1|{{PAGENAME}}}}}]]<noinclude>
{{documentation|content=
Displays a link to a template on Meta.
* {{xpds|tim|foo}}
[[Category:Shortcut templates|{{PAGENAME}}]]
[[Category:External link templates]]}}</noinclude>
2bed05d802e6f826c40c07ef66c9e0df72d4028d
Template:((
10
35
68
67
2023-12-15T14:59:41Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
{{<noinclude>
{{documentation}}[[Category:Workaround templates]]
</noinclude>
f8c63100e113b89d20396b75811d33e13b808f1a
Template:))
10
36
70
69
2023-12-15T14:59:42Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
}}<noinclude>
{{documentation}}[[Category:Workaround templates]]
</noinclude>
e2331ab1b2f6b7061b29f929a502a016b6d54a54
Template:-
10
37
72
71
2023-12-15T14:59:43Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
#REDIRECT [[Template:Clear]]
1a2aa4a9ba7478e54a2b21cbce68887ea297ea86
Template:Blue
10
38
74
73
2023-12-15T14:59:43Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<span style="color:#0645AD;">{{{1}}}</span><noinclude>{{documentation}}
[[Category:Formatting templates{{#translation:}}|{{PAGENAME}}]]
</noinclude>
636ccfaac2c8947c9d036c2a6ac80aeb94f89713
Template:Clear
10
39
76
75
2023-12-15T14:59:44Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<div style="clear: {{{1|both}}};"></div><noinclude>
{{Documentation}}</noinclude>
529df0ba87c6f5d2ef3cdc233a2f08f7a6242ec7
Template:Documentation subpage
10
40
78
77
2023-12-15T14:59:45Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude>{{#switch:<translate></translate>
| =
<includeonly><!--
-->{{#if:{{IsDocSubpage|override={{{override|doc}}}|false=}}
| <!--(this template has been transcluded on a /doc or /{{{override}}} page)-->
</includeonly><!--
-->{{#ifeq:{{{doc-notice|show}}} |show
| {{Mbox
| type = notice
| style = margin-bottom:1.0em;
| image = [[File:OOjs UI icon book-ltr.svg|40px|alt=|link=]]
| text =
'''<translate><!--T:4--> This is a [[w:Wikipedia:Template documentation|documentation]] [[<tvar name=2>Special:MyLanguage/Help:Subpages</tvar>|subpage]] for <tvar name=1>{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}</tvar>.</translate>'''<br /><!--
-->{{#if:{{{text2|}}}{{{text1|}}}
|<translate><!--T:5--> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>{{{text2|{{{text1}}}}}}</tvar>.</translate>
|<translate><!--T:10--> It contains usage information, [[<tvar name=7>Special:MyLanguage/Help:Categories</tvar>|categories]] and other content that is not part of the original <tvar name=1>{{SUBJECTSPACE}}</tvar> page.</translate>
}}
}}
}}<!--
-->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!--
-->{{#if:{{{inhibit|}}} |<!--(don't categorize)-->
| <includeonly><!--
-->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}}
| [[Category:{{#switch:{{SUBJECTSPACE}}
| Template | Project = Template
| Module = Module
| User = User
| #default = MediaWiki
}} documentation pages{{#translation:}}]]
| [[Category:Documentation subpages without corresponding pages{{#translation:}}]]
}}<!--
--></includeonly>
}}<!--
(completing initial #ifeq: at start of template:)
--><includeonly>
| <!--(this template has not been transcluded on a /doc or /{{{override}}} page)-->
}}<!--
--></includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:Documentation subpage|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{Documentation|content=
<translate>
== Usage == <!--T:6-->
<!--T:7-->
Use this template on Template Documentation subpage (/doc).
== See also == <!--T:8-->
</translate>
*{{tl|Documentation}}
*{{tl|tl}}
}}
</noinclude>
0d6a10a903dbd572fffeb01aff5983d9b3abc65c
Template:Flatlist/styles.css
10
41
80
79
2023-12-15T14:59:45Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
sanitized-css
text/css
/**
* Style for horizontal lists (separator following item).
* @source https://www.mediawiki.org/wiki/Snippets/Horizontal_lists
* @revision 9 (2016-08-10)
* @author [[User:Edokter]]
*/
.hlist dl,
.hlist ol,
.hlist ul {
margin: 0;
padding: 0;
}
/* Display list items inline */
.hlist dd,
.hlist dt,
.hlist li {
/* don't trust the note that says margin doesn't work with inline
* removing margin: 0 makes dds have margins again */
margin: 0;
display: inline;
}
/* Display nested lists inline */
/*
We remove .inline since it's not used here.
.hlist.inline,
.hlist.inline dl,
.hlist.inline ol,
.hlist.inline ul,
*/
.hlist dl dl, .hlist dl ol, .hlist dl ul,
.hlist ol dl, .hlist ol ol, .hlist ol ul,
.hlist ul dl, .hlist ul ol, .hlist ul ul {
display: inline;
}
/* Hide empty list items */
.hlist .mw-empty-li,
.hlist .mw-empty-elt {
display: none;
}
/* Generate interpuncts */
.hlist dt:after {
content: ": ";
}
.hlist dd:after,
.hlist li:after {
content: " · ";
font-weight: bold;
}
.hlist dd:last-child:after,
.hlist dt:last-child:after,
.hlist li:last-child:after {
content: none;
}
/* Add parentheses around nested lists */
.hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before,
.hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before,
.hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before {
content: " (";
font-weight: normal;
}
.hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after,
.hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after,
.hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after {
content: ")";
font-weight: normal;
}
/* Put ordinals in front of ordered list items */
.hlist ol {
counter-reset: listitem;
}
.hlist ol > li {
counter-increment: listitem;
}
.hlist ol > li:before {
content: " " counter(listitem) "\a0";
}
.hlist dd ol > li:first-child:before,
.hlist dt ol > li:first-child:before,
.hlist li ol > li:first-child:before {
content: " (" counter(listitem) "\a0";
}
9e75e584c328c44948ca9aae5c1cb4fa3c76a622
Template:High-risk
10
42
82
81
2023-12-15T14:59:46Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude>{{#switch:<translate></translate>
| =
{{ombox
| type = content
| image = [[File:OOjs UI icon alert-warning.svg|40px|alt=]]
| imageright =
| text = {{#switch:{{NAMESPACE}}
|Module={{#if:{{{1|}}}
|'''<translate><!--T:3--> This Lua module is used on approximately <tvar name=5>{{formatnum:{{{1}}}}}</tvar> pages.</translate>'''
|'''<translate><!--T:9--> This Lua module is used on many pages.</translate>'''
}}<!--/#if-->
|#default={{#if:{{{1|}}}
|'''<translate><!--T:10--> This template is used on approximately <tvar name=5>{{formatnum:{{{1}}}}}</tvar> pages.</translate>'''
|'''<translate><!--T:11--> This template is used on many pages.</translate>'''
}}<!--/#if-->
}}<!--/#switch--><br />
{{#switch:{{NAMESPACE}}
|Module=<translate><!--T:2--> To avoid large-scale disruption and unnecessary server load, any changes to this module should first be tested in its [[<tvar name=4>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/sandbox</tvar>|/sandbox]] or [[<tvar name=5>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/testcases</tvar>|/testcases]] subpages.</translate>
|#default=<translate><!--T:12--> To avoid large-scale disruption and unnecessary server load, any changes to this template should first be tested in its [[<tvar name=4>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/sandbox</tvar>|/sandbox]] or [[<tvar name=5>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{SUBJECTSPACE}}:{{BASEPAGENAME}}|#default={{SUBJECTPAGENAME}}}}/testcases</tvar>|/testcases]] subpages or in your own [[<tvar name=9>Special:MyLanguage/Help:Subpages#Use of subpages</tvar>|user subpage]].</translate>
}}<!--/#switch-->
<translate><!--T:1--> The tested changes can then be added to this page in one single edit.</translate>
{{#if:{{{2|}}}
|<translate><!--T:4--> Please consider discussing any changes at <tvar name=2>[[{{trim|{{{2}}}}}]]</tvar> before implementing them.</translate>
|<translate><!--T:13--> Please consider discussing any changes on the [[<tvar name=3>{{#switch:{{SUBPAGENAME}}|doc|sandbox={{TALKSPACE}}:{{BASEPAGENAME}}|#default={{TALKPAGENAME}}}}</tvar>|talk page]] before implementing them.</translate>
}}<!--/#if-->
}}<!--/ombox-->
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:High-risk|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{Documentation|content=
<translate><!--T:14--> This is the <tvar name="1">{{tl|high-risk}}</tvar> message box.</translate> <translate><!--T:15--> It is meant to be put at the top of the documentation page on the most high-use (high-risk) templates and Lua modules (the template detects the name space), i.e., for templates used on a large number of pages</translate>
{{note|1=<translate><!--T:16--> It is normal that some of the links in the message box are red.</translate>}}
<translate>
=== Usage === <!--T:5-->
</translate>
<translate><!--T:17--> The template can be used as is.</translate>
<translate><!--T:18--> But it can also take some parameters:</translate>
* <translate><!--T:19--> First parameter is the number of pages.</translate>
* <translate><!--T:20--> Second parameter is the name of some other talk page if you want discussion to be made there instead.</translate> <translate><!--T:21--> But a better option might be to redirect the talkpage of your template to that other talkpage.</translate>
<translate>
===Examples=== <!--T:6-->
</translate>
<pre>
{{high-risk| 30,000+ | Project:Village Pump}}
</pre>
{{high-risk| 30,000+ | Project:Village Pump}}
<pre>
{{high-risk| 30,000+ }}
</pre>
{{high-risk| 30,000+ }}
<pre>
{{high-risk| | Project:Village Pump}}
</pre>
{{high-risk| | Project:Village Pump}}
<translate><!--T:22--> The full code for a /doc page top may look like this:</translate>
<pre>
{{documentation subpage}}
<!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). -->
{{high-risk| 30,000+ }}
</pre>
<translate>
=== Technical details === <!--T:7-->
</translate>
<translate><!--T:23--> The <tvar name="1">[[{{translatable}}/sandbox|/sandbox]]</tvar> and <tvar name="2">[[{{translatable}}/testcases|/testcases]]</tvar> links are the standard names for such subpages.</translate>
<translate><!--T:24--> If those pages are created then the green /doc box for the template will detect them and link to them in its heading.</translate>
<translate><!--T:25--> For instance see the top of this documentation.</translate>
<translate>
=== See also === <!--T:8-->
</translate>
* {{tl|intricate template}} – <translate><!--T:26--> For the intricate, i.e., complex templates.</translate>
* {{tl|pp-template}} – <translate><!--T:27--> The protection template that usually is put on high-risk templates.</translate>
* {{tl|used in system}} – <translate><!--T:28--> For templates used in the user interface.</translate>
}}
</noinclude>
39984a0ba1e5d3c80a91adfd865e7acbf0112340
Template:IsDocSubpage
10
43
84
83
2023-12-15T14:59:46Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<onlyinclude><includeonly>{{#ifexpr: (
{{#ifeq:{{lc:{{SUBPAGENAME}}}}|{{lc:{{{override|doc}}}}}|1|0}} or (
{{#ifeq:{{lc:{{#titleparts:{{FULLPAGENAME}}|-1|-2}}}}|{{lc:{{{override|doc}}}}}|1|0}}
and {{#if:{{#translation:}}|1|0}}
)
)<!--
-->|{{{true|1}}}<!--
-->|{{{false|}}}<!--
-->}}</includeonly></onlyinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
47b5d5a2fb89240a721f8874924170f791de93b2
Template:Navbox/doc
10
44
86
85
2023-12-15T14:59:47Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
{{documentation subpage}}
{{lua|Module:Navbox}}
{{High-risk}}
This template allows a [[Help:Templates|navigational template]] to be set up relatively quickly by supplying it one or more lists of links. It comes equipped with default styles that should work for most navigational templates. Changing the default styles is not recommended, but is possible. Using this template, or one of its "Navbox suite" sister templates, is highly recommended for standardization of navigational templates, and for ease of use.
== Usage ==
Please remove the parameters that are left blank.
<pre style="overflow:auto;">{{Navbox
|bodyclass =
|name = {{subst:PAGENAME}}
|title =
|titlestyle =
|image =
|above =
|group1 =
|list1 =
|group2 =
|list2 =
...
|group20 =
|list20 =
|below =
}}</pre>
== Parameter list ==
{{Navbox
|name = {{BASEPAGENAME}}
|state = uncollapsed
|image = {{{image}}}
|title = {{{title}}}
|above = {{{above}}}
|group1 = {{{group1}}}
|list1 = {{{list1}}}
|group2 = {{{group2}}}
|list2 = {{{list2}}}
|list3 = {{{list3}}} ''without {{{group3}}}''
|group4 = {{{group4}}}
|list4 = {{{list4}}}
|below = {{{below}}}<br />See alternate navbox formats under: [[#Layout of table|''Layout of table'']]
}}
The navbox uses lowercase parameter names, as shown in the box (''at right''). The mandatory ''name'' and ''title'' will create a one-line box if other parameters are omitted.
Notice "group1" (etc.) is optional, as are sections named "above/below".
{{-}}
The basic and most common parameters are as follows (see below for the full list):
:<code>bodyclass -</code> applies an HTML <code>class</code> attribute to the entire navbox.
:<code>name -</code> the name of the template.
:<code>title -</code> text in the title bar, such as: <nowiki>[[Widget stuff]]</nowiki>.
:<code>titleclass -</code> applies an HTML <code>class</code> attribute to the title bar.
:<code>state - autocollapse, uncollapsed, collapsed</code>: the status of box expansion, where "autocollapse" hides stacked navboxes automatically.
:<code>titlestyle - </code>a CSS style for the title-bar, such as: <code>background:gray;</code>
:<code>groupstyle - </code>a CSS style for the group-cells, such as: <code>background:#eee;</code>
:<code>image - </code>an optional right-side image, coded as the whole image. Typically it is purely decorative, so it should be coded as <code><nowiki>[[Image:</nowiki><var>XX</var><nowiki>.jpg|90px|link=|alt=]]</nowiki></code>.
:<code>imageleft - </code>an optional left-side image (code the same as the "image" parameter).
:<code>above - </code>text to appear above the group/list section (could be a list of overall wikilinks).
:<code>group<sub>n</sub> - </code>the left-side text before list-n (if group-n omitted, list-n starts at left of box).
:<code>list<sub>n</sub> - </code>text listing wikilinks, often separated by middot templates, such as: [<nowiki />[A]]<code>{<nowiki />{·}}</code> [<nowiki />[B]]
:<code>below - </code>optional text to appear below the group/list section.
Further details, and complex restrictions, are explained below under section ''[[#Parameter descriptions|Parameter descriptions]]''. See some alternate navbox formats under: [[#Layout of table|''Layout of table'']].
== Parameter descriptions ==
The following is a complete list of parameters for using {{tl|Navbox}}. In most cases, the only required parameters are <code>name</code>, <code>title</code>, and <code>list1</code>, though [[Template:Navbox/doc#Child navboxes|child navboxes]] do not even require those to be set.
{{tl|Navbox}} shares numerous common parameter names as its sister templates {{tl|Navbox with columns}} and {{tl|Navbox with collapsible groups}} for consistency and ease of use. Parameters marked with an asterisk <nowiki>*</nowiki> are common to all three master templates.
=== Setup parameters ===
:; ''name''<nowiki>*</nowiki>
:: The name of the template, which is needed for the "v{{·}} d{{·}} e" ("view{{·}} discuss{{·}} edit") links to work properly on all pages where the template is used. You can enter <code><nowiki>{{subst:PAGENAME}}</nowiki></code> for this value as a shortcut. The name parameter is only mandatory if a <code>title</code> is specified, and the <code>border</code> parameter is not set.
:; ''state''<nowiki>*</nowiki> <span style="font-weight:normal;">[<code>autocollapse, uncollapsed, collapsed, plain, off</code>]</span>
:* Defaults to <code>autocollapse</code>. A navbox with <code>autocollapse</code> will start out collapsed if there are two or more tables on the same page that use other collapsible tables. Otherwise, the navbox will be expanded. For the technically minded, see {{Blue|MediaWiki:Common.js}}.
:* If set to <code>collapsed</code>, the navbox will always start out in a collapsed state.
:* If set to <code>plain</code>, the navbox will always be expanded with no [hide] link on the right, and the title will remain centered (by using padding to offset the <small>v • d • e</small> links).
:* If set to <code>off</code>, the navbox will always be expanded with no [hide] link on the right, but no padding will be used to keep the title centered. This is for advanced use only; the "plain" option should suffice for most applications where the [show]/[hide] button needs to be hidden.
:*If set to anything other than <code>autocollapse</code>, <code>collapsed</code>, <code>plain</code>, or <code>off</code> (such as "uncollapsed"), the navbox will always start out in an expanded state, but have the "hide" button.
: To show the box when standalone (non-included) but then auto-hide contents when in an article, put "uncollapsed" inside <noinclude> tags:
:* <code>state = </code><nowiki><noinclude>uncollapsed</noinclude></nowiki>
:* That setting will force the box visible when standalone (even when followed by other boxes), displaying "[hide]" but then auto-collapse the box when stacked inside an article.
: Often times, editors will want a default initial state for a navbox, which may be overridden in an article. Here is the trick to do this:
:*In your intermediate template, create a parameter also named "state" as a pass-through like this:
:*<code><nowiki>| state = {{{state<includeonly>|your_desired_initial_state</includeonly>}}}</nowiki></code>
:*The <nowiki><includeonly>|</nowiki> will make the template expanded when viewing the template page by itself.
:; ''navbar''<nowiki>*</nowiki>
:: Defaults to <code>Tnavbar</code>. If set to <code>plain</code>, the <small>v • d • e</small> links on the left side of the titlebar will not be displayed, and padding will be automatically used to keep the title centered. Use <code>off</code> to remove the <small>v • d • e</small> links, but not apply padding (this is for advanced use only; the "plain" option should suffice for most applications where a navbar is not desired). Note that it is highly recommended that one does not hide the navbar, in order to make it easier for users to edit the template, and to keep a standard style across pages.
:; ''border''<nowiki>*</nowiki>
:: ''See section below on using navboxes within one another for examples and a more complete description.'' If set to <code>child</code> or <code>subgroup</code>, then the navbox can be used as a borderless child that fits snuggly in another navbox. The border is hidden and there is no padding on the sides of the table, so it fits into the ''list'' area of its parent navbox. If set to <code>none</code>, then the border is hidden and padding is removed, and the navbox may be used as a child of another container (do not use the <code>none</code> option inside of another navbox; similarly, only use the <code>child</code>/<code>subgroup</code> option inside of another navbox). If set to anything else (default), then a regular navbox is displayed with a 1px border. An alternate way to specify the border to be a subgroup style is like this (i.e. use the first unnamed parameter instead of the named ''border'' parameter):
:::<code><nowiki>{{Navbox|child</nowiki></code>
::::<code>...</code>
:::<code><nowiki>}}</nowiki></code>
=== Cells ===
:; ''title''<nowiki>*</nowiki>
:: Text that appears centered in the top row of the table. It is usually the template's topic, i.e. a succinct description of the body contents. This should be a single line, but if a second line is needed, use <code><nowiki>{{-}}</nowiki></code> to ensure proper centering. This parameter is technically not mandatory, but using {{tl|Navbox}} is rather pointless without a title.
:; ''group<sub>n</sub>''<nowiki>*</nowiki>
:: (i.e. ''group1'', ''group2'', etc.) If specified, text appears in a header cell displayed to the left of ''list<sub>n</sub>''. If omitted, ''list<sub>n</sub>'' uses the full width of the table.
:; ''list<sub>n</sub>''<nowiki>*</nowiki>
:: (i.e. ''list1'', ''list2'', etc.) The body of the template, usually a list of links. Format is inline, although the text can be entered on separate lines if the entire list is enclosed within <code><nowiki><div> </div></nowiki></code>. At least one ''list'' parameter is required; each additional ''list'' is displayed in a separate row of the table. Each ''list<sub>n</sub>'' may be preceded by a corresponding ''group<sub>n</sub>'' parameter, if provided (see below).
:; ''image''<nowiki>*</nowiki>
:: An image to be displayed in a cell below the title and to the right of the body (the groups/lists). For the image to display properly, the ''list1'' parameter must be specified. The ''image'' parameter accepts standard wikicode for displaying an image, ''e.g.'':
::: <code><nowiki>[[Image:</nowiki><var>XX</var><nowiki>.jpg|90px|link=|alt=]]</nowiki></code>
:; ''imageleft''<nowiki>*</nowiki>
:: An image to be displayed in a cell below the title and to the left of the body (lists). For the image to display properly, the ''list1'' parameter must be specified and no groups can be specified. It accepts the same sort of parameter that ''image'' accepts.
:; ''above''<nowiki>*</nowiki>
:: A full-width cell displayed between the titlebar and first group/list, i.e. ''above'' the template's body (groups, lists and image). In a template without an image, ''above'' behaves in the same way as the ''list1'' parameter without the ''group1'' parameter.
:; ''below''<nowiki>*</nowiki>
:: A full-width cell displayed ''below'' the template's body (groups, lists and image). In a template without an image, ''below'' behaves in the same way as the template's final ''list<sub>n</sub>'' parameter without a ''group<sub>n</sub>'' parameter.
=== Style parameters ===
Styles are generally not recommended as to maintain consistency among templates and pages in Wikipedia. However, the option to modify styles is given.
:; ''style''<nowiki>*</nowiki>
:: Specifies CSS styles to apply to the template body. The parameter ''bodystyle'' also does the example same thing and can be used in place of this ''style'' parameter. This option should be used sparingly as it can lead to visual inconsistencies. Examples:
::: <code>style = background:#''nnnnnn'';</code>
::: <code>style = width:''N'' [em/%/px or width:auto];</code>
::: <code>style = float:[''left/right/none''];</code>
::: <code>style = clear:[''right/left/both/none''];</code>
:; ''basestyle''<nowiki>*</nowiki>
:: CSS styles to apply to the ''title'', ''above'', ''below'', and ''group'' cells all at once. The style are not applied to ''list'' cells. This is convenient for easily changing the basic color of the navbox without having to repeat the style specifications for the different parts of the navbox. Examples:
::: <code>basestyle = background:lightskyblue;</code>
:; ''titlestyle''<nowiki>*</nowiki>
:: CSS styles to apply to ''title'', most often the titlebar's background color:
::: <code><nowiki>titlestyle = background:</nowiki>''#nnnnnn'';</code>
::: <code><nowiki>titlestyle = background:</nowiki>''name'';</code>
:; ''groupstyle''<nowiki>*</nowiki>
:: CSS styles to apply to the ''groupN'' cells. This option overrides any styles that are applied to the entire table. Examples:
::: <code>groupstyle = background:#''nnnnnn'';</code>
::: <code>groupstyle = text-align:[''left/center/right''];</code>
::: <code>groupstyle = vertical-align:[''top/middle/bottom''];</code>
:; ''group<sub>n</sub>style''<nowiki>*</nowiki>
:: CSS styles to apply to a specific group, in addition to any styles specified by the ''groupstyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Examples:
::: <code>group3style = background:red;color:white;</code>
:; ''liststyle''<nowiki>*</nowiki>
:: CSS styles to apply to all lists. Overruled by the ''oddstyle'' and ''evenstyle'' parameters (if specified) below. When using backgound colors in the navbox, see the [[#Intricacies|note below]].
:; ''list<sub>n</sub>style''<nowiki>*</nowiki>
:: CSS styles to apply to a specific list, in addition to any styles specified by the ''liststyle'' parameter. This parameter should only be used when absolutely necessary in order to maintain standardization and simplicity. Examples:
::: <code>list5style = background:#ddddff;</code>
:; ''listpadding''<nowiki>*</nowiki>
:: A number and unit specifying the padding in each ''list'' cell. The ''list'' cells come equipped with a default padding of 0.25em on the left and right, and 0em on the top and bottom. Due to complex technical reasons, simply setting "liststyle=padding:0.5em;" (or any other padding setting) will not work. Examples:
::: <code>listpadding = 0.5em 0em; </code> (sets 0.5em padding for the left/right, and 0em padding for the top/bottom.)
::: <code>listpadding = 0em; </code> (removes all list padding.)
:; ''oddstyle''
:; ''evenstyle''
::Applies to odd/even list numbers. Overrules styles defined by ''liststyle''. The default behavior is to add striped colors (white and gray) to odd/even rows, respectively, in order to improve readability. These should not be changed except in extraordinary circumstances.
:; ''evenodd'' <span style="font-weight:normal;"><code>[swap, even, odd, off]</code></span>
:: If set to <code>swap</code>, then the automatic striping of even and odd rows is reversed. Normally, even rows get a light gray background for striping; when this parameter is used, the odd rows receive the gray striping instead of the even rows. Setting to <code>even</code> or <code>odd</code> sets all rows to have that striping color. Setting to <code>off</code> disables automatic row striping. This advanced parameter should only be used to fix problems when the navbox is being used as a child of another navbox and the stripes do not match up. Examples and a further description can be found in the section on child navboxes below.
:; ''abovestyle''<nowiki>*</nowiki>
:; ''belowstyle''<nowiki>*</nowiki>
:: CSS styles to apply to the top cell (specified via the ''above'' parameter) and bottom cell (specified via the ''below'' parameter). Typically used to set background color or text alignment:
::: <code>abovestyle = background:#''nnnnnn'';</code>
::: <code>abovestyle = text-align:[''left/center/right''];</code>
:; ''imagestyle''<nowiki>*</nowiki>
:; ''imageleftstyle''<nowiki>*</nowiki>
:: CSS styles to apply to the cells where the image/imageleft sits. These styles should only be used in exceptional circumstances, usually to fix width problems if the width of groups is set and the width of the image cell grows too large. Examples:
::: <code>imagestyle = width:5em;</code>
===== Default styles =====
The style settings listed here are those that editors using the navbox change most often. The other more complex style settings were left out of this list to keep it simple. Most styles are set in {{Blue|MediaWiki:Common.css}}.
:<code>bodystyle = background:#fdfdfd; width:100%; vertical-align:middle;</code>
:<code>titlestyle = background:#ccccff; padding-left:1em; padding-right:1em; text-align:center;</code>
:<code>abovestyle = background:#ddddff; padding-left:1em; padding-right:1em; text-align:center;</code>
:<code>belowstyle = background:#ddddff; padding-left:1em; padding-right:1em; text-align:center;</code>
:<code>groupstyle = background:#ddddff; padding-left:1em; padding-right:1em; text-align:right;</code>
:<code>liststyle = background:transparent; text-align:left/center;</code>
:<code>oddstyle = background:transparent;</code>
:<code>evenstyle = background:#f7f7f7;</code>
Since ''liststyle'' and ''oddstyle'' are transparent odd lists have the color of the ''bodystyle'', which defaults to #fdfdfd (white with a hint of gray). A list has <code>text-align:left;</code> if it has a group, if not it has <code>text-align:center;</code>. Since only ''bodystyle'' has a vertical-align all the others inherit its <code>vertical-align:middle;</code>.
=== Advanced parameters ===
:; ''titlegroup''
:: This puts a group in the title area, with the same default styles as ''group<sub>n</sub>''. It should be used only in exceptional circumstances (usually advanced meta-templates) and its use requires some knowledge of the internal code of {{tl|Navbox}}; you should be ready to manually set up CSS styles to get everything to work properly if you wish to use it. If you think you have an application for this parameter, it might be best to change your mind, or consult the talk page first.
:; ''titlegroupstyle''
:: The styles for the titlegroup cell.
:; ''innerstyle''
:: A very advanced parameter to be used ''only'' for advanced meta-templates employing the navbox. Internally, the navbox uses an outer table to draw the border, and then an inner table for everything else (title/above/groups/lists/below/images, etc.). The ''style''/''bodystyle'' parameter sets the style for the outer table, which the inner table inherits, but in advanced cases (meta-templates) it may be necessary to directly set the style for the inner table. This parameter provides access to that inner table so styles can be applied. Use at your own risk.
====Microformats====
;bodyclass : This parameter is inserted into the "class" attribute for the infobox as a whole.
;titleclass : This parameter is inserted into the "class" attribute for the infobox's title caption.
This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a navbox as containing [[w:hCard|hCard]] information about a person, for example, add the following parameter:
<pre>
|bodyclass = vcard
</pre>
''and''
<pre>
|titleclass = fn
</pre>
''or'' (for example):
<pre><nowiki>
|title = The books of <span class="fn">[[Iain Banks]]</span>
</nowiki></pre>
...and so forth.
== Layout of table ==
Table generated by {{tl|Navbox}} '''without''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only):
{{Navbox
|name = Navbox/doc
|state = uncollapsed
|liststyle = background:silver;
|title = {{{title}}}
|group1 = {{{group1}}}
|list1 = {{{list1}}}
|group2 = {{{group2}}}
|list2 = {{{list2}}}
|list3 = {{{list3}}} ''without {{{group3}}}''
|group4 = {{{group4}}}
|list4 = {{{list4}}}
}}
Table generated by {{tl|Navbox}} '''with''' ''image'', ''above'' and ''below'' parameters (gray list background color added for illustration only):
{{Navbox
|name = Navbox/doc
|state = uncollapsed
|liststyle = background:silver;
|image = {{{image}}}
|title = {{{title}}}
|above = {{{above}}}
|group1 = {{{group1}}}
|list1 = {{{list1}}}
|group2 = {{{group2}}}
|list2 = {{{list2}}}
|list3 = {{{list3}}} ''without {{{group3}}}''
|group4 = {{{group4}}}
|list4 = {{{list4}}}
|below = {{{below}}}
}}
Table generated by {{tl|Navbox}} '''with''' ''image'', ''imageleft'', ''lists'', and '''without''' ''groups'', ''above'', ''below'' (gray list background color added for illustration only):
{{Navbox
|name = Navbox/doc
|state = uncollapsed
|liststyle = background:silver;
|image = {{{image}}}
|imageleft = {{{imageleft}}}
|title = {{{title}}}
|list1 = {{{list1}}}
|list2 = {{{list2}}}
|list3 = {{{list3}}}
|list4 = {{{list4}}}
}}
== Technical details ==
*This template uses CSS classes for most of its looks, thus it is fully skinnable.
*Internally this meta template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta templates since wiki markup has several drawbacks. For instance it makes it harder to use [[m:Help:ParserFunctions|parser functions]] and special characters in parameters.
*For more technical details see the CSS classes in {{Blue|MediaWiki:Common.css}} and the collapsible table used to hide the box in {{Blue|MediaWiki:Common.js}}.
=== Intricacies ===
*The 2px wide border between groups and lists is drawn using the border-left property of the list cell. Thus, if you wish to change the background color of the template (for example <code>bodystyle = background:purple;</code>), then you'll need to make the border-left-color match the background color (i.e. <code>liststyle = border-left-color:purple;</code>). If you wish to have a border around each list cell, then the 2px border between the list cells and group cells will disappear; you'll have to come up with your own solution.
*The list cell width is initially set to 100%. Thus, if you wish to manually set the width of group cells, you'll need to also specify the liststyle to have width:auto. If you wish to set the group width and use images, it's up to you to figure out the CSS in the groupstyle, liststyle, imagestyle, and imageleftstyle parameters to get everything to work correctly. Example of setting group width:
::<code>groupstyle = width:10em;</code>
::<code>liststyle = width:auto;</code>
*Adjacent navboxes have only a 1 pixel border between them (except in IE6, which doesn't support the necessary CSS). If you set the top or bottom margin of <code>style/bodystyle</code>, then this will not work.
*The default margin-left and margin-right of the outer navbox table are set to "auto;". If you wish to use navbox as a float, you need to manually set the margin-left and margin-right values, because the auto margins interfere with the float option. For example, add the following code to use the navbox as a float:
::<code>style = width:22em;float:right;margin-left:1em;margin-right:0em;</code>
== TemplateData ==
{{TemplateData header}}
<templatedata>
{
"format": "block",
"description": {
"en": "This template allows a navigational template to be set up relatively quickly by supplying it one or more lists of links.",
"cs": "Tato šablona umožňuje poměrně rychle nastavit navigační šablonu tím, že jí poskytne jeden nebo více seznamů odkazů."
},
"params": {
"image": {
"label": {
"en": "Image",
"cs": "Obraz"
},
"type": "wiki-file-name"
},
"imageleft": {
"label": {
"en": "Image left",
"cs": "Obrázek vlevo"
},
"type": "wiki-file-name"
},
"name": {
"label": {
"en": "Template Name",
"cs": "Název šablony"
},
"description": {
"en": "The name of the template that creates this navbox.",
"cs": "Název šablony, která vytváří toto navigační pole."
},
"autovalue": "{{subst:PAGENAME}}",
"suggested": true,
"type": "wiki-template-name"
},
"title": {
"label": {
"en": "Title",
"cs": "Titul"
},
"type": "string"
},
"above": {
"label": {
"en": "Content above",
"cs": "Obsah výše"
},
"type": "content"
},
"group1": {
"label": {
"en": "Group #1",
"cs": "Skupina 1"
},
"type": "string"
},
"list1": {
"label": {
"en": "List #1",
"cs": "Seznam 1"
},
"type": "content"
},
"group2": {
"label": {
"en": "Group 2",
"cs": "Skupina 2"
},
"type": "string"
},
"list2": {
"label": {
"en": "List #2",
"cs": "Seznam 2"
},
"type": "content"
},
"list3": {
"label": {
"en": "List #3",
"cs": "Seznam 3"
},
"type": "content"
},
"group3": {
"label": {
"en": "Group #3",
"cs": "Skupina 3"
},
"type": "string"
},
"group4": {
"label": {
"en": "Group #4",
"cs": "Skupina 4"
},
"type": "string"
},
"list4": {
"label": {
"en": "List #4",
"cs": "Seznam 4"
},
"type": "content"
},
"group5": {
"label": {
"en": "Group #5",
"cs": "Skupina 5"
},
"type": "string"
},
"list5": {
"label": {
"en": "List #5",
"cs": "Seznam 5"
},
"type": "content"
},
"group6": {
"label": {
"en": "Group #6",
"cs": "Skupina 6"
},
"type": "string"
},
"list6": {
"label": {
"en": "List #6",
"cs": "Seznam 6"
},
"type": "content"
},
"group7": {
"label": {
"en": "Group #7",
"cs": "Skupina 7"
},
"type": "string"
},
"list7": {
"label": {
"en": "List #7",
"cs": "Seznam 7"
},
"type": "content"
},
"group8": {
"label": {
"en": "Group #8",
"cs": "Skupina 8"
},
"type": "string"
},
"list8": {
"label": {
"en": "List #8",
"cs": "Seznam 8"
},
"type": "content"
},
"group9": {
"label": {
"en": "Group #9",
"cs": "Skupina 9"
},
"type": "string"
},
"list9": {
"label": {
"en": "List #9",
"cs": "Seznam 9"
},
"type": "content"
},
"group10": {
"label": {
"en": "Group #10",
"cs": "Skupina 10"
},
"type": "string"
},
"list10": {
"label": {
"en": "List #10",
"cs": "Seznam 10"
},
"type": "content"
},
"group11": {
"label": {
"en": "Group #11",
"cs": "Skupina 11"
},
"type": "string"
},
"list11": {
"label": {
"en": "List #11",
"cs": "Seznam 11"
},
"type": "content"
},
"group12": {
"label": {
"en": "Group #12",
"cs": "Skupina 12"
},
"type": "string"
},
"list12": {
"label": {
"en": "List #12",
"cs": "Seznam 12"
},
"type": "content"
},
"group13": {
"label": {
"en": "Group #13",
"cs": "Skupina 13"
},
"type": "string"
},
"list13": {
"label": {
"en": "List #13",
"cs": "Seznam 13"
},
"type": "content"
},
"group14": {
"label": {
"en": "Group #14",
"cs": "Skupina 14"
},
"type": "string"
},
"list14": {
"label": {
"en": "List #14",
"cs": "Seznam 14"
},
"type": "content"
},
"group15": {
"label": {
"en": "Group #15",
"cs": "Skupina 15"
},
"type": "string"
},
"list15": {
"label": {
"en": "List #15",
"cs": "Seznam 15"
},
"type": "content"
},
"group16": {
"label": {
"en": "Group #16",
"cs": "Skupina 16"
},
"type": "string"
},
"list16": {
"label": {
"en": "List #16",
"cs": "Seznam 16"
},
"type": "content"
},
"group17": {
"label": {
"en": "Group #17",
"cs": "Skupina 17"
},
"type": "string"
},
"list17": {
"label": {
"en": "List #17",
"cs": "Seznam 17"
},
"type": "content"
},
"group18": {
"label": {
"en": "Group #18",
"cs": "Skupina 18"
},
"type": "string"
},
"list18": {
"label": {
"en": "List #18",
"cs": "Seznam 18"
},
"type": "content"
},
"group19": {
"label": {
"en": "Group #19",
"cs": "Skupina 19"
},
"type": "string"
},
"list19": {
"label": {
"en": "List #19",
"cs": "Seznam 19"
},
"type": "content"
},
"group20": {
"label": {
"en": "Group #20",
"cs": "Skupina 20"
},
"type": "string"
},
"list20": {
"label": {
"en": "List #20",
"cs": "Seznam 20"
},
"type": "content"
},
"below": {
"label": {
"en": "Content below",
"cs": "Obsah níže"
},
"type": "content"
}
},
"paramOrder": [
"name",
"title",
"image",
"imageleft",
"above",
"group1",
"list1",
"group2",
"list2",
"group3",
"list3",
"group4",
"list4",
"group5",
"list5",
"group6",
"list6",
"group7",
"list7",
"group8",
"list8",
"group9",
"list9",
"group10",
"list10",
"group11",
"list11",
"group12",
"list12",
"group13",
"list13",
"group14",
"list14",
"group15",
"list15",
"group16",
"list16",
"group17",
"list17",
"group18",
"list18",
"group19",
"list19",
"group20",
"list20",
"below"
]
}
</templatedata>
<includeonly>{{Sandbox other||
<!--Categories-->
[[Category:Formatting templates| ]]
<!--Other languages-->
}}</includeonly>
8142de78771267fe9dbd05b8df296fa561200adf
Template:Ombox
10
45
88
87
2023-12-15T14:59:48Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<onlyinclude>{{#invoke:Message box|ombox}}</onlyinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
f5c3203172e44c84d587cc7824db31d90604ddcb
Template:Pagelang
10
46
90
89
2023-12-15T14:59:49Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
{{#ifeq:{{#invoke:Template translation|getLanguageSubpage|{{{1|}}}}}|en
|{{#ifeq:{{#titleparts:{{{1|{{PAGENAME}}}}}||-1}}|en
|{{#invoke:Template translation|getLanguageSubpage|{{{1|}}}}}
}}
|{{#invoke:Template translation|getLanguageSubpage|{{{1|}}}}}
}}<noinclude>
{{Documentation}}
</noinclude>
c4102d40356283246cbc855bef4754c0a15b4bea
Template:Sandbox other
10
47
92
91
2023-12-15T14:59:49Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<onlyinclude>{{#switch:{{SUBPAGENAME}}|sandbox|doc={{{1|}}}|#default={{{2|}}}}}</onlyinclude>
{{documentation}}
44919af6b57ac865d8ec53eabfcb2cb9de35f157
Template:TemplateData header
10
48
94
93
2023-12-15T14:59:50Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<noinclude>
<languages/>
<onlyinclude>{{#switch:<translate></translate>
|=
<div class="templatedata-header"><!--
-->{{#if:{{yesno|{{{editlinks|}}}}}<!--
-->|{{#ifexpr:<!--
-->{{#if:{{{docpage|}}}<!--
-->|{{#ifeq:{{FULLPAGENAME}}|{{transclude|{{{docpage}}}}}|0|1}}<!--
-->|not{{IsDocSubpage|false=0}}<!--
-->}}<!--
-->|{{Navbar|{{{docpage|{{BASEPAGENAME}}/doc}}}|plain=1|brackets=1|style=float:{{dir|{{PAGELANGUAGE}}|left|right}};}}<!--
-->}}<!--
-->}}
{{#if:{{{noheader|}}}||<translate><!--T:1--> This is the [[<tvar name=1>Special:MyLanguage/Help:TemplateData</tvar>|TemplateData]] documentation for this template used by [[<tvar name=2>Special:MyLanguage/VisualEditor</tvar>|VisualEditor]] and other tools.</translate>}}
'''{{{1|{{BASEPAGENAME}}}}}'''
</div><includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|<!--
-->|{{#if:{{IsDocSubpage|false=}}<!--
-->|[[Category:TemplateData documentation{{#translation:}}]]<!--
-->|[[Category:Templates using TemplateData{{#translation:}}]]<!--
-->}}<!--
-->}}</includeonly>
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:TemplateData header|noshift=1|uselang={{#if:{{pagelang}}|{{pagelang}}|{{int:lang}}}}}}
}}</onlyinclude>
{{Documentation|content=
<translate><!--T:3--> Inserts a brief header for the template data section.</translate>
<translate><!--T:4--> Adds the <tvar name=1>/doc</tvar> subpage to <tvar name=2>{{ll|Category:TemplateData documentation}}</tvar> and the template page to <tvar name=3>{{ll|Category:Templates using TemplateData}}</tvar>.</translate>
<translate>
== Usage == <!--T:2-->
</translate>
{{#tag:syntaxhighlight|
==TemplateData== or ==Parameters== or ==Usage==
{{((}}TemplateData header{{))}}
{{^(}}templatedata{{)^}}{
...
}{{^(}}/templatedata{{)^}}
|lang=html
}}
<translate>
<!--T:5-->
Use {{<tvar name=1>tmpl|0=<code>{{((}}TemplateData header{{!}}$1{{))}}</code></tvar>|Template name}} to display a name for the template other than the default, which is <tvar name="2">{{ll|Help:Magic words#Variables|<nowiki>{{BASEPAGENAME}}</nowiki>}}</tvar>.
</translate>
<dl><dd>
{{TemplateData header|Template name}}
</dd></dl>
<translate>
<!--T:6-->
Use <tvar name="1"><code><nowiki>{{TemplateData header|noheader=1}}</nowiki></code></tvar> to omit the first sentence of the header text.
</translate>
<dl><dd>
{{TemplateData header|noheader=1}}
</dd></dl>
<translate>
==Parameters== <!--T:7-->
</translate>
{{TemplateData header/doc}}
}}
</noinclude>
fb4d205deeaf9a9cf1191b38b29e14095265870b
Template:Tl
10
49
96
95
2023-12-15T14:59:50Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
{{((}}[[Template:{{{1}}}|{{{1}}}]]{{))}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage and interwikis go on Wikidata. -->
</noinclude>
1447a15b7ca7f93848d1ac4b792d61a1d8555e3b
Template:Yesno
10
50
98
97
2023-12-15T14:59:50Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#switch: {{<includeonly>safesubst:</includeonly>lc: {{{1|¬}}} }}
|no
|n
|false
|0 = {{{no|<!-- null -->}}}
| = {{{blank|{{{no|<!-- null -->}}}}}}
|¬ = {{{¬|}}}
|yes
|y
|true
|1 = {{{yes|yes}}}
|#default = {{{def|{{{yes|yes}}}}}}
}}<noinclude>
{{Documentation}}
</noinclude>
166fab9e5411aacd02ca4c9e93fbc7bf6bcf26ac
Template:·
10
51
100
99
2023-12-15T14:59:51Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<b>·</b> <noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
bddcd60a7b03421d93c14219c3518e748538fd4e
Module:Navbar/styles.css
828
52
102
101
2023-12-15T14:59:56Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
sanitized-css
text/css
/** {{Shared Template Warning}}
* This TemplateStyles page is separately used for [[Template:Navbar]]
* because of course there are two versions of the same template.
* Be careful when adjusting styles accordingly.
*/
.navbar {
display: inline;
font-size: 88%;
font-weight: normal;
}
.navbar ul {
display: inline;
white-space: nowrap;
}
.navbar li {
word-spacing: -0.125em;
}
/* Navbar styling when nested in navbox */
.navbox .navbar {
display: block;
font-size: 100%;
}
.navbox-title .navbar {
/* @noflip */
float: left;
/* @noflip */
text-align: left;
/* @noflip */
margin-right: 0.5em;
width: 6em;
}
daa254bc716c42f79e6be78a9d0a82bdbe57f9f2
Module:Template translation
828
53
104
103
2023-12-15T14:59:58Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
Scribunto
text/plain
local this = {}
function this.checkLanguage(subpage, default)
--[[Check first if there's an any invalid character that would cause the
mw.language.isKnownLanguageTag function() to throw an exception:
- all ASCII controls in [\000-\031\127],
- double quote ("), sharp sign (#), ampersand (&), apostrophe ('),
- slash (/), colon (:), semicolon (;), lower than (<), greater than (>),
- brackets and braces ([, ], {, }), pipe (|), backslash (\\)
All other characters are accepted, including space and all non-ASCII
characters (including \192, which is invalid in UTF-8).
--]]
if mw.language.isValidCode(subpage) and mw.language.isKnownLanguageTag(subpage)
--[[However "SupportedLanguages" are too restrictive, as they discard many
valid BCP47 script variants (only because MediaWiki still does not
define automatic transliterators for them, e.g. "en-dsrt" or
"fr-brai" for French transliteration in Braille), and country variants,
(useful in localized data, even if they are no longer used for
translations, such as zh-cn, also useful for legacy codes).
We want to avoid matching subpagenames containing any uppercase letter,
(even if they are considered valid in BCP 47, in which they are
case-insensitive; they are not "SupportedLanguages" for MediaWiki, so
they are not "KnownLanguageTags" for MediaWiki).
To be more restrictive, we exclude tags
* for specific uses in template subpages and unusable as language tags;
* that is not ASCII and not a lowercase letter, minus-hyphen, or digit,
or does not start by a letter or does not finish by a letter or digit;
* or that has subtags with more than 8 characters between hyphens;
* or that has two hyphens.
--]]
or subpage ~= "doc"
and subpage ~= "layout"
and subpage ~= "button"
and subpage ~= "buttons"
and subpage ~= "sandbox"
and subpage ~= "testcase"
and subpage ~= "testcases"
and string.find(subpage, "^[%l][%-%d%l]*[%d%l]$") ~= nil
and string.find(subpage, "[%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l][%d%l]") == nil
and string.find(subpage, "%-%-") == nil then
return subpage
end
-- Otherwise there's currently no known language subpage
return default
end
--[[Get the last subpage of an arbitrary page if it is a translation.
To be used from templates.
]]
function this.getLanguageSubpage(frame)
local title = frame and frame.args[1]
if not title or title == '' then
title = mw.title.getCurrentTitle()
end
return this._getLanguageSubpage(title)
end
--[[Get the last subpage of an arbitrary page if it is a translation.
To be used from Lua.
]]
function this._getLanguageSubpage(title)
if type(title) == 'string' then
title = mw.title.new(title)
end
if not title then
-- invalid title
return nil
end
--[[This code does not work in all namespaces where the Translate tool works.
-- It works in the main namespace on Meta because it allows subpages there
-- It would not work in the main namespace of English Wikipedia (but the
-- articles are monolignual on that wiki).
-- On Meta-Wiki the main space uses subpages and its pages are translated.
-- The Translate tool allows translatng pages in all namespaces, even if
-- the namespace officially does not have subpages.
-- On Meta-Wiki the Category namespace still does not have subpages enabled,
-- even if they would be very useful for categorizing templates, that DO have
-- subpages (for documentatio and tstboxes pages). This is a misconfiguration
-- bug of Meta-Wiki. The work-around is to split the full title and then
-- get the last titlepart.
local subpage = title.subpageText
--]]
local titleparts = mw.text.split(title.fullText, '/')
local subpage = titleparts[#titleparts]
return this.checkLanguage(subpage, '')
end
--[[Get the last subpage of the current page if it is a translation.
]]
function this.getCurrentLanguageSubpage()
return this._getLanguageSubpage(mw.title.getCurrentTitle())
end
--[[Get the first part of the language code of the subpage, before the '-'.
--]]
function this.getMainLanguageSubpage()
parts = mw.text.split(this.getCurrentLanguageSubpage(), '-')
return parts[1]
end
--[[Get the last subpage of the current frame if it is a translation.
Not used locally.
--]]
function this.getFrameLanguageSubpage(frame)
return this._getLanguageSubpage(frame:getParent():getTitle())
end
--[[Get the language of the current page. Not used locally.
--]]
function this.getLanguage()
local subpage = mw.title.getCurrentTitle().subpageText
return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode())
end
--[[Get the language of the current frame. Not used locally.
--]]
function this.getFrameLanguage(frame)
local titleparts = mw.text.split(frame:getParent():getTitle(), '/')
local subpage = titleparts[#titleparts]
return this.checkLanguage(subpage, mw.language.getContentLanguage():getCode())
end
function this.title(namespace, basepagename, subpage)
local message, title
local pagename = basepagename
if (subpage or '') ~= '' then
pagename = pagename .. '/' .. subpage
end
local valid, title = xpcall(function()
return mw.title.new(pagename, namespace) -- costly
end, function(msg) -- catch undocumented exception (!?)
-- thrown when namespace does not exist. The doc still
-- says it should return a title, even in that case...
message = msg
end)
if valid and title ~= nil and (title.id or 0) ~= 0 then
return title
end
return { -- "pseudo" mw.title object with id = nil in case of error
prefixedText = pagename, -- the only property we need below
message = message -- only for debugging
}
end
--[[If on a translation subpage (like Foobar/de), this function returns
a given template in the same language, if the translation is available.
Otherwise, the template is returned in its default language, without
modification.
This is aimed at replacing the current implementation of Template:TNTN.
This version does not expand the returned template name: this solves the
problem of self-recursion in TNT when translatable templates need themselves
to transclude other translable templates (such as Tnavbar).
--]]
function this.getTranslatedTemplate(frame, withStatus)
local args = frame.args
local pagename = args['template']
--[[Check whether the pagename is actually in the Template namespace, or
if we're transcluding a main-namespace page.
(added for backward compatibility of Template:TNT)
]]
local namespace, title = args['tntns'] or ''
if namespace ~= '' then -- Checks for tntns parameter for custom ns.
title = this.title(namespace, pagename) -- Costly
else -- Supposes that set page is in ns10.
namespace = 'Template'
title = this.title(namespace, pagename) -- Costly
if title.id == nil then -- not found in the Template namespace, assume the main namespace (for backward compatibility)
namespace = ''
title = this.title(namespace, pagename) -- Costly
end
end
-- Get the last subpage and check if it matches a known language code.
local subpage = args['uselang'] or ''
if subpage == '' then
subpage = this.getCurrentLanguageSubpage()
end
if subpage == '' then
-- Check if a translation of the pagename exists in English
local newtitle = this.title(namespace, pagename, 'en') -- Costly
-- Use the translation when it exists
if newtitle.id ~= nil then
title = newtitle
end
else
-- Check if a translation of the pagename exists in that language
local newtitle = this.title(namespace, pagename, subpage) -- Costly
if newtitle.id == nil then
-- Check if a translation of the pagename exists in English
newtitle = this.title(namespace, pagename, 'en') -- Costly
end
-- Use the translation when it exists
if newtitle.id ~= nil then
title = newtitle
end
end
-- At this point the title should exist
if withStatus then
-- status returned to Lua function below
return title.prefixedText, title.id ~= nil
else
-- returned directly to MediaWiki
return title.prefixedText
end
end
--[[If on a translation subpage (like Foobar/de), this function renders
a given template in the same language, if the translation is available.
Otherwise, the template is rendered in its default language, without
modification.
This is aimed at replacing the current implementation of Template:TNT.
Note that translatable templates cannot transclude themselves other
translatable templates, as it will recurse on TNT. Use TNTN instead
to return only the effective template name to expand externally, with
template parameters also provided externally.
--]]
function this.renderTranslatedTemplate(frame)
local title, found = this.getTranslatedTemplate(frame, true)
-- At this point the title should exist prior to performing the expansion
-- of the template, otherwise render a red link to the missing page
-- (resolved in its assumed namespace). If we don't tet this here, a
-- script error would be thrown. Returning a red link is consistant with
-- MediaWiki behavior when attempting to transclude inexistant templates.
if not found then
return '[[' .. title .. ']]'
end
-- Copy args pseudo-table to a proper table so we can feed it to expandTemplate.
-- Then render the pagename.
local args = frame.args
local pargs = (frame:getParent() or {}).args
local arguments = {}
if (args['noshift'] or '') == '' then
for k, v in pairs(pargs) do
local n = tonumber(k) or 0
if n <= 0 then -- unnumbered args
arguments[k] = v
elseif n >= 2 then -- numbered args >= 2 need to be shifted
arguments[n - 1] = v
end
end
else -- special case where TNT is used as autotranslate
-- (don't shift again what is shifted in the invokation)
for k, v in pairs(pargs) do
arguments[k] = v
end
end
arguments['template'] = title -- override the existing parameter of the base template name supplied with the full name of the actual template expanded
arguments['tntns'] = nil -- discard the specified namespace override
arguments['uselang'] = args['uselang'] -- argument forwarded into parent frame
arguments['noshift'] = args['noshift'] -- argument forwarded into parent frame
return frame:expandTemplate{title = ':' .. title, args = arguments}
end
--[[A helper for mocking TNT in Special:TemplateSandbox. TNT breaks
TemplateSandbox; mocking it with this method means templates won't be
localized but at least TemplateSandbox substitutions will work properly.
Won't work with complex uses.
--]]
function this.mockTNT(frame)
local pargs = (frame:getParent() or {}).args
local arguments = {}
for k, v in pairs(pargs) do
local n = tonumber(k) or 0
if n <= 0 then -- unnumbered args
arguments[k] = v
elseif n >= 2 then -- numbered args >= 2 need to be shifted
arguments[n - 1] = v
end
end
if not pargs[1] then
return ''
end
return frame:expandTemplate{title = 'Template:' .. pargs[1], args = arguments}
end
return this
5d6ccce18a15ce0078fd1918b6afeb5b443f37ee
Template:Components
10
54
105
2023-12-15T18:20:40Z
HyperNervie
2
Created page with "{{Navbox |name={{subst:PAGENAME}} |title=[[Component|Components]] |state={{{state|uncollapsed}}} |list1={{Navbox|child |title=Card entity components |state={{{state1|uncollapsed}}} |group1=Basic |list1=<!-- -->[[Component/Attack|Attack]] • <!-- -->[[Component/BoardAbility|BoardAbility]] • <!-- -->[[Component/Burst|Burst]] • <!-- -->[[Component/Card|Card]] • <!-- -->[[Component/CreateInFront|CreateInFront]] • <!-- -->Component/Environm..."
wikitext
text/x-wiki
{{Navbox
|name=Components
|title=[[Component|Components]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=Card entity components
|state={{{state1|uncollapsed}}}
|group1=Basic
|list1=<!--
-->[[Component/Attack|Attack]] • <!--
-->[[Component/BoardAbility|BoardAbility]] • <!--
-->[[Component/Burst|Burst]] • <!--
-->[[Component/Card|Card]] • <!--
-->[[Component/CreateInFront|CreateInFront]] • <!--
-->[[Component/Environment|Environment]] • <!--
-->[[Component/FromBurst|FromBurst]] • <!--
-->[[Component/Health|Health]] • <!--
-->[[Component/Plants|Plants]] • <!--
-->[[Component/PrimarySuperpower|PrimarySuperpower]] • <!--
-->[[Component/Rarity|Rarity]] • <!--
-->[[Component/ShowTriggeredIcon|ShowTriggeredIcon]] • <!--
-->[[Component/Subtypes|Subtypes]] • <!--
-->[[Component/SunCost|SunCost]] • <!--
-->[[Component/Superpower|Superpower]] • <!--
-->[[Component/Surprise|Surprise]] • <!--
-->[[Component/Tags|Tags]] • <!--
-->[[Component/Unusable|Unusable]] • <!--
-->[[Component/Zombies|Zombies]]
|group2=Ability-wise
|list2=<!--
-->[[Component/Aquatic|Aquatic]] • <!--
-->[[Component/Armor|Armor]] • <!--
-->[[Component/AttackOverride|AttackOverride]] • <!--
-->[[Component/AttacksInAllLanes|AttacksInAllLanes]] • <!--
-->[[Component/AttacksOnlyInAdjacentLanes|AttacksOnlyInAdjacentLanes]] • <!--
-->[[Component/Deadly|Deadly]] • <!--
-->[[Component/EffectEntitiesDescriptor|EffectEntitiesDescriptor]] • <!--
-->[[Component/EvolutionRestriction|EvolutionRestriction]] • <!--
-->[[Component/Evolvable|Evolvable]] • <!--
-->[[Component/Frenzy|Frenzy]] • <!--
-->[[Component/GrantedTriggeredAbilities|GrantedTriggeredAbilities]] • <!--
-->[[Component/Multishot|Multishot]] • <!--
-->[[Component/PlaysFaceDown|PlaysFaceDown]] • <!--
-->[[Component/SplashDamage|SplashDamage]] • <!--
-->[[Component/Springboard|Springboard]] • <!--
-->[[Component/Strikethrough|Strikethrough]] • <!--
-->[[Component/Teamup|Teamup]] • <!--
-->[[Component/Truestrike|Truestrike]] • <!--
-->[[Component/Untrickable|Untrickable]]
|group3=Indirect
|list3=<!--
-->[[Component/DamageImmunity|DamageImmunity]] • <!--
-->[[Component/Evolved|Evolved]] • <!--
-->[[Component/FaceDown|FaceDown]] • <!--
-->[[Component/MarkedForDeath|MarkedForDeath]] • <!--
-->[[Component/Mustache|Mustache]] • <!--
-->[[Component/Unhealable|Unhealable]]<!--
-->{{Navbox|child
|group1=Not for cards
|list1=<!--
-->[[Component/GrassTerrain|GrassTerrain]] • <!--
-->[[Component/Graveyard|Graveyard]] • <!--
-->[[Component/HighgroundTerrain|HighgroundTerrain]] • <!--
-->[[Component/Lane|Lane]] • <!--
-->[[Component/Player|Player]] • <!--
-->[[Component/WaterTerrain|WaterTerrain]]
}}
}}
|list2={{Navbox|child
|title=Effect entity components
|state={{{state2|uncollapsed}}}
|group1=Triggers
|list1=<!--
-->[[Component/BuffTrigger|Buff]] • <!--
-->[[Component/CombatEndTrigger|CombatEnd]] • <!--
-->[[Component/DamageTrigger|Damage]] • <!--
-->[[Component/DestroyCardTrigger|DestroyCard]] • <!--
-->[[Component/DiscardFromPlayTrigger|DiscardFromPlay]] • <!--
-->[[Component/DrawCardTrigger|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetTrigger|DrawCardFromSubset]] • <!--
-->[[Component/EnterBoardTrigger|EnterBoard]] • <!--
-->[[Component/ExtraAttackTrigger|ExtraAttack]] • <!--
-->[[Component/HealTrigger|Heal]] • <!--
-->[[Component/LaneCombatEndTrigger|LaneCombatEnd]] • <!--
-->[[Component/LaneCombatStartTrigger|LaneCombatStart]] • <!--
-->[[Component/MoveTrigger|Move]] • <!--
-->[[Component/PlayTrigger|Play]] • <!--
-->[[Component/ReturnToHandTrigger|ReturnToHand]] • <!--
-->[[Component/RevealTrigger|Reveal]] • <!--
-->[[Component/RevealPhaseEndTrigger|RevealPhaseEnd]] • <!--
-->[[Component/SlowedTrigger|Slowed]] • <!--
-->[[Component/SurprisePhaseStartTrigger|SurprisePhaseStart]] • <!--
-->[[Component/TurnStartTrigger|TurnStart]]
|group2=Filters
|list2=<!--
-->[[Component/PrimaryTargetFilter|PrimaryTarget]] • <!--
-->[[Component/SecondaryTargetFilter|SecondaryTarget]] • <!--
-->[[Component/SelfEntityFilter|SelfEntity]] • <!--
-->[[Component/SelfLaneEntityFilter|SelfLaneEntity]] • <!--
-->[[Component/TriggerSourceFilter|TriggerSource]] • <!--
-->[[Component/TriggerTargetFilter|TriggerTarget]]
|group3=Effect<br>descriptors
|list3=<!--
-->[[Component/AttackInLaneEffectDescriptor|AttackInLane]] • <!--
-->[[Component/BuffEffectDescriptor|Buff]] • <!--
-->[[Component/ChargeBlockMeterEffectDescriptor|ChargeBlockMeter]] • <!--
-->[[Component/CopyCardEffectDescriptor|CopyCard]] • <!--
-->[[Component/CopyStatsEffectDescriptor|CopyStats]] • <!--
-->[[Component/CreateCardEffectDescriptor|CreateCard]] • <!--
-->[[Component/CreateCardFromSubsetEffectDescriptor|CreateCardFromSubset]] • <!--
-->[[Component/CreateCardInDeckEffectDescriptor|CreateCardInDeck]] • <!--
-->[[Component/DamageEffectDescriptor|Damage]] • <!--
-->[[Component/DestroyCardEffectDescriptor|DestroyCard]] • <!--
-->[[Component/DrawCardEffectDescriptor|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetEffectDescriptor|DrawCardFromSubset]] • <!--
-->[[Component/ExtraAttackEffectDescriptor|ExtraAttack]] • <!--
-->[[Component/GainSunEffectDescriptor|GainSun]] • <!--
-->[[Component/GrantAbilityEffectDescriptor|GrantAbility]] • <!--
-->[[Component/GrantTriggeredAbilityEffectDescriptor|GrantTriggeredAbility]] • <!--
-->[[Component/HealEffectDescriptor|Heal]] • <!--
-->[[Component/MixedUpGravediggerEffectDescriptor|MixedUpGravedigger]] • <!--
-->[[Component/ModifySunCostEffectDescriptor|ModifySunCost]] • <!--
-->[[Component/MoveCardToLanesEffectDescriptor|MoveCardToLanes]] • <!--
-->[[Component/ReturnToHandFromPlayEffectDescriptor|ReturnToHandFromPlay]] • <!--
-->[[Component/SetStatEffectDescriptor|SetStat]] • <!--
-->[[Component/SlowEffectDescriptor|Slow]] • <!--
-->[[Component/TransformIntoCardFromSubsetEffectDescriptor|TransformIntoCardFromSubset]] • <!--
-->[[Component/TurnIntoGravestoneEffectDescriptor|TurnIntoGravestone]]
|group4=Multipliers
|list4=<!--
-->[[Component/DrawnCardCostMultiplier|DrawnCardCost]] • <!--
-->[[Component/HeroHealthMultiplier|HeroHealth]] • <!--
-->[[Component/QueryMultiplier|Query]] • <!--
-->[[Component/SunGainedMultiplier|SunGained]] • <!--
-->[[Component/TargetAttackMultiplier|TargetAttack]] • <!--
-->[[Component/TargetAttackOrHealthMultiplier|TargetAttackOrHealth]] • <!--
-->[[Component/TargetHealthMultiplier|TargetHealth]]
|group5=Conditions
|list5=<!--
-->[[Component/EffectValueCondition|EffectValue]] • <!--
-->[[Component/OncePerGameCondition|OncePerGame]] • <!--
-->[[Component/OncePerTurnCondition|OncePerTurn]] • <!--
-->[[Component/PlayerInfoCondition|PlayerInfo]] • <!--
-->[[Component/QueryEntityCondition|QueryEntity]]
|group6=Others
|list6=<!--
-->[[Component/ActiveTargets|ActiveTargets]] • <!--
-->[[Component/Continuous|Continuous]] • <!--
-->[[Component/DamageEffectRedirector|DamageEffectRedirector]] • <!--
-->[[Component/DamageEffectRedirectorDescriptor|DamageEffectRedirectorDescriptor]] • <!--
-->[[Component/EffectEntityGrouping|EffectEntityGrouping]] • <!--
-->[[Component/EffectValueDescriptor|EffectValueDescriptor]] • <!--
-->[[Component/HeraldEntities|HeraldEntities]] • <!--
-->[[Component/PersistsAfterTransform|PersistsAfterTransform]] • <!--
-->[[Component/TransformWithCreationSource|TransformWithCreationSource]]
}}
}}<noinclude>[[Category:Navbox template]]</noinclude>
bdb890976a8ae2fda2e517e2db03f4ae00dc6e3f
106
105
2023-12-15T18:26:00Z
HyperNervie
2
Add {{clear}}
wikitext
text/x-wiki
{{Clear}}
{{Navbox
|name=Components
|title=[[Component|Components]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=Card entity components
|state={{{state1|uncollapsed}}}
|group1=Basic
|list1=<!--
-->[[Component/Attack|Attack]] • <!--
-->[[Component/BoardAbility|BoardAbility]] • <!--
-->[[Component/Burst|Burst]] • <!--
-->[[Component/Card|Card]] • <!--
-->[[Component/CreateInFront|CreateInFront]] • <!--
-->[[Component/Environment|Environment]] • <!--
-->[[Component/FromBurst|FromBurst]] • <!--
-->[[Component/Health|Health]] • <!--
-->[[Component/Plants|Plants]] • <!--
-->[[Component/PrimarySuperpower|PrimarySuperpower]] • <!--
-->[[Component/Rarity|Rarity]] • <!--
-->[[Component/ShowTriggeredIcon|ShowTriggeredIcon]] • <!--
-->[[Component/Subtypes|Subtypes]] • <!--
-->[[Component/SunCost|SunCost]] • <!--
-->[[Component/Superpower|Superpower]] • <!--
-->[[Component/Surprise|Surprise]] • <!--
-->[[Component/Tags|Tags]] • <!--
-->[[Component/Unusable|Unusable]] • <!--
-->[[Component/Zombies|Zombies]]
|group2=Ability-wise
|list2=<!--
-->[[Component/Aquatic|Aquatic]] • <!--
-->[[Component/Armor|Armor]] • <!--
-->[[Component/AttackOverride|AttackOverride]] • <!--
-->[[Component/AttacksInAllLanes|AttacksInAllLanes]] • <!--
-->[[Component/AttacksOnlyInAdjacentLanes|AttacksOnlyInAdjacentLanes]] • <!--
-->[[Component/Deadly|Deadly]] • <!--
-->[[Component/EffectEntitiesDescriptor|EffectEntitiesDescriptor]] • <!--
-->[[Component/EvolutionRestriction|EvolutionRestriction]] • <!--
-->[[Component/Evolvable|Evolvable]] • <!--
-->[[Component/Frenzy|Frenzy]] • <!--
-->[[Component/GrantedTriggeredAbilities|GrantedTriggeredAbilities]] • <!--
-->[[Component/Multishot|Multishot]] • <!--
-->[[Component/PlaysFaceDown|PlaysFaceDown]] • <!--
-->[[Component/SplashDamage|SplashDamage]] • <!--
-->[[Component/Springboard|Springboard]] • <!--
-->[[Component/Strikethrough|Strikethrough]] • <!--
-->[[Component/Teamup|Teamup]] • <!--
-->[[Component/Truestrike|Truestrike]] • <!--
-->[[Component/Untrickable|Untrickable]]
|group3=Indirect
|list3=<!--
-->[[Component/DamageImmunity|DamageImmunity]] • <!--
-->[[Component/Evolved|Evolved]] • <!--
-->[[Component/FaceDown|FaceDown]] • <!--
-->[[Component/MarkedForDeath|MarkedForDeath]] • <!--
-->[[Component/Mustache|Mustache]] • <!--
-->[[Component/Unhealable|Unhealable]]<!--
-->{{Navbox|child
|group1=Not for cards
|list1=<!--
-->[[Component/GrassTerrain|GrassTerrain]] • <!--
-->[[Component/Graveyard|Graveyard]] • <!--
-->[[Component/HighgroundTerrain|HighgroundTerrain]] • <!--
-->[[Component/Lane|Lane]] • <!--
-->[[Component/Player|Player]] • <!--
-->[[Component/WaterTerrain|WaterTerrain]]
}}
}}
|list2={{Navbox|child
|title=Effect entity components
|state={{{state2|uncollapsed}}}
|group1=Triggers
|list1=<!--
-->[[Component/BuffTrigger|Buff]] • <!--
-->[[Component/CombatEndTrigger|CombatEnd]] • <!--
-->[[Component/DamageTrigger|Damage]] • <!--
-->[[Component/DestroyCardTrigger|DestroyCard]] • <!--
-->[[Component/DiscardFromPlayTrigger|DiscardFromPlay]] • <!--
-->[[Component/DrawCardTrigger|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetTrigger|DrawCardFromSubset]] • <!--
-->[[Component/EnterBoardTrigger|EnterBoard]] • <!--
-->[[Component/ExtraAttackTrigger|ExtraAttack]] • <!--
-->[[Component/HealTrigger|Heal]] • <!--
-->[[Component/LaneCombatEndTrigger|LaneCombatEnd]] • <!--
-->[[Component/LaneCombatStartTrigger|LaneCombatStart]] • <!--
-->[[Component/MoveTrigger|Move]] • <!--
-->[[Component/PlayTrigger|Play]] • <!--
-->[[Component/ReturnToHandTrigger|ReturnToHand]] • <!--
-->[[Component/RevealTrigger|Reveal]] • <!--
-->[[Component/RevealPhaseEndTrigger|RevealPhaseEnd]] • <!--
-->[[Component/SlowedTrigger|Slowed]] • <!--
-->[[Component/SurprisePhaseStartTrigger|SurprisePhaseStart]] • <!--
-->[[Component/TurnStartTrigger|TurnStart]]
|group2=Filters
|list2=<!--
-->[[Component/PrimaryTargetFilter|PrimaryTarget]] • <!--
-->[[Component/SecondaryTargetFilter|SecondaryTarget]] • <!--
-->[[Component/SelfEntityFilter|SelfEntity]] • <!--
-->[[Component/SelfLaneEntityFilter|SelfLaneEntity]] • <!--
-->[[Component/TriggerSourceFilter|TriggerSource]] • <!--
-->[[Component/TriggerTargetFilter|TriggerTarget]]
|group3=Effect<br>descriptors
|list3=<!--
-->[[Component/AttackInLaneEffectDescriptor|AttackInLane]] • <!--
-->[[Component/BuffEffectDescriptor|Buff]] • <!--
-->[[Component/ChargeBlockMeterEffectDescriptor|ChargeBlockMeter]] • <!--
-->[[Component/CopyCardEffectDescriptor|CopyCard]] • <!--
-->[[Component/CopyStatsEffectDescriptor|CopyStats]] • <!--
-->[[Component/CreateCardEffectDescriptor|CreateCard]] • <!--
-->[[Component/CreateCardFromSubsetEffectDescriptor|CreateCardFromSubset]] • <!--
-->[[Component/CreateCardInDeckEffectDescriptor|CreateCardInDeck]] • <!--
-->[[Component/DamageEffectDescriptor|Damage]] • <!--
-->[[Component/DestroyCardEffectDescriptor|DestroyCard]] • <!--
-->[[Component/DrawCardEffectDescriptor|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetEffectDescriptor|DrawCardFromSubset]] • <!--
-->[[Component/ExtraAttackEffectDescriptor|ExtraAttack]] • <!--
-->[[Component/GainSunEffectDescriptor|GainSun]] • <!--
-->[[Component/GrantAbilityEffectDescriptor|GrantAbility]] • <!--
-->[[Component/GrantTriggeredAbilityEffectDescriptor|GrantTriggeredAbility]] • <!--
-->[[Component/HealEffectDescriptor|Heal]] • <!--
-->[[Component/MixedUpGravediggerEffectDescriptor|MixedUpGravedigger]] • <!--
-->[[Component/ModifySunCostEffectDescriptor|ModifySunCost]] • <!--
-->[[Component/MoveCardToLanesEffectDescriptor|MoveCardToLanes]] • <!--
-->[[Component/ReturnToHandFromPlayEffectDescriptor|ReturnToHandFromPlay]] • <!--
-->[[Component/SetStatEffectDescriptor|SetStat]] • <!--
-->[[Component/SlowEffectDescriptor|Slow]] • <!--
-->[[Component/TransformIntoCardFromSubsetEffectDescriptor|TransformIntoCardFromSubset]] • <!--
-->[[Component/TurnIntoGravestoneEffectDescriptor|TurnIntoGravestone]]
|group4=Multipliers
|list4=<!--
-->[[Component/DrawnCardCostMultiplier|DrawnCardCost]] • <!--
-->[[Component/HeroHealthMultiplier|HeroHealth]] • <!--
-->[[Component/QueryMultiplier|Query]] • <!--
-->[[Component/SunGainedMultiplier|SunGained]] • <!--
-->[[Component/TargetAttackMultiplier|TargetAttack]] • <!--
-->[[Component/TargetAttackOrHealthMultiplier|TargetAttackOrHealth]] • <!--
-->[[Component/TargetHealthMultiplier|TargetHealth]]
|group5=Conditions
|list5=<!--
-->[[Component/EffectValueCondition|EffectValue]] • <!--
-->[[Component/OncePerGameCondition|OncePerGame]] • <!--
-->[[Component/OncePerTurnCondition|OncePerTurn]] • <!--
-->[[Component/PlayerInfoCondition|PlayerInfo]] • <!--
-->[[Component/QueryEntityCondition|QueryEntity]]
|group6=Others
|list6=<!--
-->[[Component/ActiveTargets|ActiveTargets]] • <!--
-->[[Component/Continuous|Continuous]] • <!--
-->[[Component/DamageEffectRedirector|DamageEffectRedirector]] • <!--
-->[[Component/DamageEffectRedirectorDescriptor|DamageEffectRedirectorDescriptor]] • <!--
-->[[Component/EffectEntityGrouping|EffectEntityGrouping]] • <!--
-->[[Component/EffectValueDescriptor|EffectValueDescriptor]] • <!--
-->[[Component/HeraldEntities|HeraldEntities]] • <!--
-->[[Component/PersistsAfterTransform|PersistsAfterTransform]] • <!--
-->[[Component/TransformWithCreationSource|TransformWithCreationSource]]
}}
}}<noinclude>[[Category:Navbox template]]</noinclude>
e63619bf8232d2a7426bd744be5b87e357113097
110
106
2023-12-16T09:23:49Z
HyperNervie
2
wikitext
text/x-wiki
{{Clear}}
{{Navbox
|name=Components
|title=[[Component|Components]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=Card entity components
|state={{{state1|uncollapsed}}}
|group1=Basic
|list1=<!--
-->[[Component/Attack|Attack]] • <!--
-->[[Component/BoardAbility|BoardAbility]] • <!--
-->[[Component/Burst|Burst]] • <!--
-->[[Component/Card|Card]] • <!--
-->[[Component/CreateInFront|CreateInFront]] • <!--
-->[[Component/Environment|Environment]] • <!--
-->[[Component/FromBurst|FromBurst]] • <!--
-->[[Component/Health|Health]] • <!--
-->[[Component/Plants|Plants]] • <!--
-->[[Component/PrimarySuperpower|PrimarySuperpower]] • <!--
-->[[Component/Rarity|Rarity]] • <!--
-->[[Component/ShowTriggeredIcon|ShowTriggeredIcon]] • <!--
-->[[Component/Subtypes|Subtypes]] • <!--
-->[[Component/SunCost|SunCost]] • <!--
-->[[Component/Superpower|Superpower]] • <!--
-->[[Component/Surprise|Surprise]] • <!--
-->[[Component/Tags|Tags]] • <!--
-->[[Component/Unusable|Unusable]] • <!--
-->[[Component/Zombies|Zombies]]
|group2=Ability-wise
|list2=<!--
-->[[Component/Aquatic|Aquatic]] • <!--
-->[[Component/Armor|Armor]] • <!--
-->[[Component/AttackOverride|AttackOverride]] • <!--
-->[[Component/AttacksInAllLanes|AttacksInAllLanes]] • <!--
-->[[Component/AttacksOnlyInAdjacentLanes|AttacksOnlyInAdjacentLanes]] • <!--
-->[[Component/Deadly|Deadly]] • <!--
-->[[Component/EffectEntitiesDescriptor|EffectEntitiesDescriptor]] • <!--
-->[[Component/EvolutionRestriction|EvolutionRestriction]] • <!--
-->[[Component/Evolvable|Evolvable]] • <!--
-->[[Component/Frenzy|Frenzy]] • <!--
-->[[Component/GrantedTriggeredAbilities|GrantedTriggeredAbilities]] • <!--
-->[[Component/Multishot|Multishot]] • <!--
-->[[Component/PlaysFaceDown|PlaysFaceDown]] • <!--
-->[[Component/SplashDamage|SplashDamage]] • <!--
-->[[Component/Springboard|Springboard]] • <!--
-->[[Component/Strikethrough|Strikethrough]] • <!--
-->[[Component/Teamup|Teamup]] • <!--
-->[[Component/Truestrike|Truestrike]] • <!--
-->[[Component/Untrickable|Untrickable]]
|group3=Indirect
|list3=<!--
-->[[Component/CanPlayFighterInSurprisePhase|CanPlayFighterInSurprisePhase]]* • <!--
-->[[Component/DamageImmunity|DamageImmunity]] • <!--
-->[[Component/Evolved|Evolved]] • <!--
-->[[Component/FaceDown|FaceDown]] • <!--
-->[[Component/GravestoneSpy|GravestoneSpy]]* • <!--
-->[[Component/MarkedForDeath|MarkedForDeath]] • <!--
-->[[Component/Mustache|Mustache]] • <!--
-->[[Component/Unhealable|Unhealable]]<!--
-->{{Navbox|child
|group1=Not for cards
|list1=<!--
-->[[Component/GrassTerrain|GrassTerrain]] • <!--
-->[[Component/Graveyard|Graveyard]] • <!--
-->[[Component/HighgroundTerrain|HighgroundTerrain]] • <!--
-->[[Component/Lane|Lane]] • <!--
-->[[Component/Player|Player]] • <!--
-->[[Component/WaterTerrain|WaterTerrain]]
}}
|list4=<nowiki/>* Vanilla [[cards.json]] never uses these as components, but they can be checked using [[Query/HasComponent|HasComponent]] and [[Query/LacksComponent|LacksComponent]] queries.
}}
|list2={{Navbox|child
|title=Effect entity components
|state={{{state2|uncollapsed}}}
|group1=Triggers
|list1=<!--
-->[[Component/BuffTrigger|Buff]] • <!--
-->[[Component/CombatEndTrigger|CombatEnd]] • <!--
-->[[Component/DamageTrigger|Damage]] • <!--
-->[[Component/DestroyCardTrigger|DestroyCard]] • <!--
-->[[Component/DiscardFromPlayTrigger|DiscardFromPlay]] • <!--
-->[[Component/DrawCardTrigger|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetTrigger|DrawCardFromSubset]] • <!--
-->[[Component/EnterBoardTrigger|EnterBoard]] • <!--
-->[[Component/ExtraAttackTrigger|ExtraAttack]] • <!--
-->[[Component/HealTrigger|Heal]] • <!--
-->[[Component/LaneCombatEndTrigger|LaneCombatEnd]] • <!--
-->[[Component/LaneCombatStartTrigger|LaneCombatStart]] • <!--
-->[[Component/MoveTrigger|Move]] • <!--
-->[[Component/PlayTrigger|Play]] • <!--
-->[[Component/ReturnToHandTrigger|ReturnToHand]] • <!--
-->[[Component/RevealTrigger|Reveal]] • <!--
-->[[Component/RevealPhaseEndTrigger|RevealPhaseEnd]] • <!--
-->[[Component/SlowedTrigger|Slowed]] • <!--
-->[[Component/SurprisePhaseStartTrigger|SurprisePhaseStart]] • <!--
-->[[Component/TurnStartTrigger|TurnStart]]
|group2=Filters
|list2=<!--
-->[[Component/PrimaryTargetFilter|PrimaryTarget]] • <!--
-->[[Component/SecondaryTargetFilter|SecondaryTarget]] • <!--
-->[[Component/SelfEntityFilter|SelfEntity]] • <!--
-->[[Component/SelfLaneEntityFilter|SelfLaneEntity]] • <!--
-->[[Component/TriggerSourceFilter|TriggerSource]] • <!--
-->[[Component/TriggerTargetFilter|TriggerTarget]]
|group3=Effect<br>descriptors
|list3=<!--
-->[[Component/AttackInLaneEffectDescriptor|AttackInLane]] • <!--
-->[[Component/BuffEffectDescriptor|Buff]] • <!--
-->[[Component/ChargeBlockMeterEffectDescriptor|ChargeBlockMeter]] • <!--
-->[[Component/CopyCardEffectDescriptor|CopyCard]] • <!--
-->[[Component/CopyStatsEffectDescriptor|CopyStats]] • <!--
-->[[Component/CreateCardEffectDescriptor|CreateCard]] • <!--
-->[[Component/CreateCardFromSubsetEffectDescriptor|CreateCardFromSubset]] • <!--
-->[[Component/CreateCardInDeckEffectDescriptor|CreateCardInDeck]] • <!--
-->[[Component/DamageEffectDescriptor|Damage]] • <!--
-->[[Component/DestroyCardEffectDescriptor|DestroyCard]] • <!--
-->[[Component/DrawCardEffectDescriptor|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetEffectDescriptor|DrawCardFromSubset]] • <!--
-->[[Component/ExtraAttackEffectDescriptor|ExtraAttack]] • <!--
-->[[Component/GainSunEffectDescriptor|GainSun]] • <!--
-->[[Component/GrantAbilityEffectDescriptor|GrantAbility]] • <!--
-->[[Component/GrantTriggeredAbilityEffectDescriptor|GrantTriggeredAbility]] • <!--
-->[[Component/HealEffectDescriptor|Heal]] • <!--
-->[[Component/MixedUpGravediggerEffectDescriptor|MixedUpGravedigger]] • <!--
-->[[Component/ModifySunCostEffectDescriptor|ModifySunCost]] • <!--
-->[[Component/MoveCardToLanesEffectDescriptor|MoveCardToLanes]] • <!--
-->[[Component/ReturnToHandFromPlayEffectDescriptor|ReturnToHandFromPlay]] • <!--
-->[[Component/SetStatEffectDescriptor|SetStat]] • <!--
-->[[Component/SlowEffectDescriptor|Slow]] • <!--
-->[[Component/TransformIntoCardFromSubsetEffectDescriptor|TransformIntoCardFromSubset]] • <!--
-->[[Component/TurnIntoGravestoneEffectDescriptor|TurnIntoGravestone]]
|group4=Multipliers
|list4=<!--
-->[[Component/DrawnCardCostMultiplier|DrawnCardCost]] • <!--
-->[[Component/HeroHealthMultiplier|HeroHealth]] • <!--
-->[[Component/QueryMultiplier|Query]] • <!--
-->[[Component/SunGainedMultiplier|SunGained]] • <!--
-->[[Component/TargetAttackMultiplier|TargetAttack]] • <!--
-->[[Component/TargetAttackOrHealthMultiplier|TargetAttackOrHealth]] • <!--
-->[[Component/TargetHealthMultiplier|TargetHealth]]
|group5=Conditions
|list5=<!--
-->[[Component/EffectValueCondition|EffectValue]] • <!--
-->[[Component/OncePerGameCondition|OncePerGame]] • <!--
-->[[Component/OncePerTurnCondition|OncePerTurn]] • <!--
-->[[Component/PlayerInfoCondition|PlayerInfo]] • <!--
-->[[Component/QueryEntityCondition|QueryEntity]]
|group6=Others
|list6=<!--
-->[[Component/ActiveTargets|ActiveTargets]] • <!--
-->[[Component/Continuous|Continuous]] • <!--
-->[[Component/DamageEffectRedirector|DamageEffectRedirector]] • <!--
-->[[Component/DamageEffectRedirectorDescriptor|DamageEffectRedirectorDescriptor]] • <!--
-->[[Component/EffectEntityGrouping|EffectEntityGrouping]] • <!--
-->[[Component/EffectValueDescriptor|EffectValueDescriptor]] • <!--
-->[[Component/HeraldEntities|HeraldEntities]] • <!--
-->[[Component/PersistsAfterTransform|PersistsAfterTransform]] • <!--
-->[[Component/TransformWithCreationSource|TransformWithCreationSource]]
}}
}}<noinclude>[[Category:Navbox template]]</noinclude>
d3c147a70f0b96e4fad60025fb27773bc9c74fb2
111
110
2023-12-16T12:50:45Z
HyperNervie
2
wikitext
text/x-wiki
{{Clear}}
{{Navbox
|name=Components
|title=[[Component|Components]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=Card entity components
|state={{{state1|uncollapsed}}}
|group1=Basic
|list1=<!--
-->[[Component/Attack|Attack]] • <!--
-->[[Component/BoardAbility|BoardAbility]] • <!--
-->[[Component/Burst|Burst]] • <!--
-->[[Component/Card|Card]] • <!--
-->[[Component/CreateInFront|CreateInFront]] • <!--
-->[[Component/Environment|Environment]] • <!--
-->[[Component/FromBurst|FromBurst]] • <!--
-->[[Component/Health|Health]] • <!--
-->[[Component/Plants|Plants]] • <!--
-->[[Component/PrimarySuperpower|PrimarySuperpower]] • <!--
-->[[Component/Rarity|Rarity]] • <!--
-->[[Component/ShowTriggeredIcon|ShowTriggeredIcon]] • <!--
-->[[Component/Subtypes|Subtypes]] • <!--
-->[[Component/SunCost|SunCost]] • <!--
-->[[Component/Superpower|Superpower]] • <!--
-->[[Component/Surprise|Surprise]] • <!--
-->[[Component/Tags|Tags]] • <!--
-->[[Component/Unusable|Unusable]] • <!--
-->[[Component/Zombies|Zombies]]
|group2=Ability-wise
|list2=<!--
-->[[Component/Aquatic|Aquatic]] • <!--
-->[[Component/Armor|Armor]] • <!--
-->[[Component/AttackOverride|AttackOverride]] • <!--
-->[[Component/AttacksInAllLanes|AttacksInAllLanes]] • <!--
-->[[Component/AttacksOnlyInAdjacentLanes|AttacksOnlyInAdjacentLanes]] • <!--
-->[[Component/Deadly|Deadly]] • <!--
-->[[Component/EffectEntitiesDescriptor|EffectEntitiesDescriptor]] • <!--
-->[[Component/EvolutionRestriction|EvolutionRestriction]] • <!--
-->[[Component/Evolvable|Evolvable]] • <!--
-->[[Component/Frenzy|Frenzy]] • <!--
-->[[Component/GrantedTriggeredAbilities|GrantedTriggeredAbilities]] • <!--
-->[[Component/Multishot|Multishot]] • <!--
-->[[Component/PlaysFaceDown|PlaysFaceDown]] • <!--
-->[[Component/SplashDamage|SplashDamage]] • <!--
-->[[Component/Springboard|Springboard]] • <!--
-->[[Component/Strikethrough|Strikethrough]] • <!--
-->[[Component/Teamup|Teamup]] • <!--
-->[[Component/Truestrike|Truestrike]] • <!--
-->[[Component/Untrickable|Untrickable]]
|group3=Indirect
|list3=<!--
-->[[Component/CanPlayFighterInSurprisePhase|CanPlayFighterInSurprisePhase]]* • <!--
-->[[Component/DamageImmunity|DamageImmunity]] • <!--
-->[[Component/Evolved|Evolved]] • <!--
-->[[Component/FaceDown|FaceDown]] • <!--
-->[[Component/GravestoneSpy|GravestoneSpy]]* • <!--
-->[[Component/MarkedForDeath|MarkedForDeath]] • <!--
-->[[Component/Mustache|Mustache]] • <!--
-->[[Component/Unhealable|Unhealable]]<!--
-->{{Navbox|child
|group1=Not for cards
|list1=<!--
-->[[Component/GrassTerrain|GrassTerrain]] • <!--
-->[[Component/Graveyard|Graveyard]] • <!--
-->[[Component/HighgroundTerrain|HighgroundTerrain]] • <!--
-->[[Component/Lane|Lane]] • <!--
-->[[Component/Player|Player]] • <!--
-->[[Component/WaterTerrain|WaterTerrain]]
}}
|list4=<nowiki/>* Vanilla [[cards.json]] never uses these as components, but they can still be checked using [[Query/HasComponent|HasComponent]] and [[Query/LacksComponent|LacksComponent]] queries.
}}
|list2={{Navbox|child
|title=Effect entity components
|state={{{state2|uncollapsed}}}
|group1=Triggers
|list1=<!--
-->[[Component/BuffTrigger|Buff]] • <!--
-->[[Component/CombatEndTrigger|CombatEnd]] • <!--
-->[[Component/DamageTrigger|Damage]] • <!--
-->[[Component/DestroyCardTrigger|DestroyCard]] • <!--
-->[[Component/DiscardFromPlayTrigger|DiscardFromPlay]] • <!--
-->[[Component/DrawCardTrigger|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetTrigger|DrawCardFromSubset]] • <!--
-->[[Component/EnterBoardTrigger|EnterBoard]] • <!--
-->[[Component/ExtraAttackTrigger|ExtraAttack]] • <!--
-->[[Component/HealTrigger|Heal]] • <!--
-->[[Component/LaneCombatEndTrigger|LaneCombatEnd]] • <!--
-->[[Component/LaneCombatStartTrigger|LaneCombatStart]] • <!--
-->[[Component/MoveTrigger|Move]] • <!--
-->[[Component/PlayTrigger|Play]] • <!--
-->[[Component/ReturnToHandTrigger|ReturnToHand]] • <!--
-->[[Component/RevealTrigger|Reveal]] • <!--
-->[[Component/RevealPhaseEndTrigger|RevealPhaseEnd]] • <!--
-->[[Component/SlowedTrigger|Slowed]] • <!--
-->[[Component/SurprisePhaseStartTrigger|SurprisePhaseStart]] • <!--
-->[[Component/TurnStartTrigger|TurnStart]]
|group2=Filters
|list2=<!--
-->[[Component/PrimaryTargetFilter|PrimaryTarget]] • <!--
-->[[Component/SecondaryTargetFilter|SecondaryTarget]] • <!--
-->[[Component/SelfEntityFilter|SelfEntity]] • <!--
-->[[Component/SelfLaneEntityFilter|SelfLaneEntity]] • <!--
-->[[Component/TriggerSourceFilter|TriggerSource]] • <!--
-->[[Component/TriggerTargetFilter|TriggerTarget]]
|group3=Effect descriptors
|list3=<!--
-->[[Component/AttackInLaneEffectDescriptor|AttackInLane]] • <!--
-->[[Component/BuffEffectDescriptor|Buff]] • <!--
-->[[Component/ChargeBlockMeterEffectDescriptor|ChargeBlockMeter]] • <!--
-->[[Component/CopyCardEffectDescriptor|CopyCard]] • <!--
-->[[Component/CopyStatsEffectDescriptor|CopyStats]] • <!--
-->[[Component/CreateCardEffectDescriptor|CreateCard]] • <!--
-->[[Component/CreateCardFromSubsetEffectDescriptor|CreateCardFromSubset]] • <!--
-->[[Component/CreateCardInDeckEffectDescriptor|CreateCardInDeck]] • <!--
-->[[Component/DamageEffectDescriptor|Damage]] • <!--
-->[[Component/DestroyCardEffectDescriptor|DestroyCard]] • <!--
-->[[Component/DrawCardEffectDescriptor|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetEffectDescriptor|DrawCardFromSubset]] • <!--
-->[[Component/ExtraAttackEffectDescriptor|ExtraAttack]] • <!--
-->[[Component/GainSunEffectDescriptor|GainSun]] • <!--
-->[[Component/GrantAbilityEffectDescriptor|GrantAbility]] • <!--
-->[[Component/GrantTriggeredAbilityEffectDescriptor|GrantTriggeredAbility]] • <!--
-->[[Component/HealEffectDescriptor|Heal]] • <!--
-->[[Component/MixedUpGravediggerEffectDescriptor|MixedUpGravedigger]] • <!--
-->[[Component/ModifySunCostEffectDescriptor|ModifySunCost]] • <!--
-->[[Component/MoveCardToLanesEffectDescriptor|MoveCardToLanes]] • <!--
-->[[Component/ReturnToHandFromPlayEffectDescriptor|ReturnToHandFromPlay]] • <!--
-->[[Component/SetStatEffectDescriptor|SetStat]] • <!--
-->[[Component/SlowEffectDescriptor|Slow]] • <!--
-->[[Component/TransformIntoCardFromSubsetEffectDescriptor|TransformIntoCardFromSubset]] • <!--
-->[[Component/TurnIntoGravestoneEffectDescriptor|TurnIntoGravestone]]
|group4=Multipliers
|list4=<!--
-->[[Component/DrawnCardCostMultiplier|DrawnCardCost]] • <!--
-->[[Component/HeroHealthMultiplier|HeroHealth]] • <!--
-->[[Component/QueryMultiplier|Query]] • <!--
-->[[Component/SunGainedMultiplier|SunGained]] • <!--
-->[[Component/TargetAttackMultiplier|TargetAttack]] • <!--
-->[[Component/TargetAttackOrHealthMultiplier|TargetAttackOrHealth]] • <!--
-->[[Component/TargetHealthMultiplier|TargetHealth]]
|group5=Conditions
|list5=<!--
-->[[Component/EffectValueCondition|EffectValue]] • <!--
-->[[Component/OncePerGameCondition|OncePerGame]] • <!--
-->[[Component/OncePerTurnCondition|OncePerTurn]] • <!--
-->[[Component/PlayerInfoCondition|PlayerInfo]] • <!--
-->[[Component/QueryEntityCondition|QueryEntity]]
|group6=Others
|list6=<!--
-->[[Component/ActiveTargets|ActiveTargets]] • <!--
-->[[Component/Continuous|Continuous]] • <!--
-->[[Component/DamageEffectRedirector|DamageEffectRedirector]] • <!--
-->[[Component/DamageEffectRedirectorDescriptor|DamageEffectRedirectorDescriptor]] • <!--
-->[[Component/EffectEntityGrouping|EffectEntityGrouping]] • <!--
-->[[Component/EffectValueDescriptor|EffectValueDescriptor]] • <!--
-->[[Component/HeraldEntities|HeraldEntities]] • <!--
-->[[Component/PersistsAfterTransform|PersistsAfterTransform]] • <!--
-->[[Component/TransformWithCreationSource|TransformWithCreationSource]]
}}
}}<noinclude>[[Category:Navbox template]]</noinclude>
2b8ee17e7d15529b95207994f175d66f2a6a0895
113
111
2023-12-16T15:38:37Z
HyperNervie
2
wikitext
text/x-wiki
{{Clear}}
{{Navbox
|name=Components
|title=[[Component|Components]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=[[Component#Card entity components|Card entity components]]
|state={{{state1|uncollapsed}}}
|group1=Basic
|list1=<!--
-->[[Component/Attack|Attack]] • <!--
-->[[Component/BoardAbility|BoardAbility]] • <!--
-->[[Component/Burst|Burst]] • <!--
-->[[Component/Card|Card]] • <!--
-->[[Component/CreateInFront|CreateInFront]] • <!--
-->[[Component/Environment|Environment]] • <!--
-->[[Component/FromBurst|FromBurst]] • <!--
-->[[Component/Health|Health]] • <!--
-->[[Component/Plants|Plants]] • <!--
-->[[Component/PrimarySuperpower|PrimarySuperpower]] • <!--
-->[[Component/Rarity|Rarity]] • <!--
-->[[Component/ShowTriggeredIcon|ShowTriggeredIcon]] • <!--
-->[[Component/Subtypes|Subtypes]] • <!--
-->[[Component/SunCost|SunCost]] • <!--
-->[[Component/Superpower|Superpower]] • <!--
-->[[Component/Surprise|Surprise]] • <!--
-->[[Component/Tags|Tags]] • <!--
-->[[Component/Unusable|Unusable]] • <!--
-->[[Component/Zombies|Zombies]]
|group2=Ability-wise
|list2=<!--
-->[[Component/Aquatic|Aquatic]] • <!--
-->[[Component/Armor|Armor]] • <!--
-->[[Component/AttackOverride|AttackOverride]] • <!--
-->[[Component/AttacksInAllLanes|AttacksInAllLanes]] • <!--
-->[[Component/AttacksOnlyInAdjacentLanes|AttacksOnlyInAdjacentLanes]] • <!--
-->[[Component/Deadly|Deadly]] • <!--
-->[[Component/EffectEntitiesDescriptor|EffectEntitiesDescriptor]] • <!--
-->[[Component/EvolutionRestriction|EvolutionRestriction]] • <!--
-->[[Component/Evolvable|Evolvable]] • <!--
-->[[Component/Frenzy|Frenzy]] • <!--
-->[[Component/GrantedTriggeredAbilities|GrantedTriggeredAbilities]] • <!--
-->[[Component/Multishot|Multishot]] • <!--
-->[[Component/PlaysFaceDown|PlaysFaceDown]] • <!--
-->[[Component/SplashDamage|SplashDamage]] • <!--
-->[[Component/Springboard|Springboard]] • <!--
-->[[Component/Strikethrough|Strikethrough]] • <!--
-->[[Component/Teamup|Teamup]] • <!--
-->[[Component/Truestrike|Truestrike]] • <!--
-->[[Component/Untrickable|Untrickable]]
|group3=[[Component#Forbidden|Forbidden]]
|list3=<!--
-->[[Component/CanPlayFighterInSurprisePhase|CanPlayFighterInSurprisePhase]]* • <!--
-->[[Component/DamageImmunity|DamageImmunity]] • <!--
-->[[Component/Evolved|Evolved]] • <!--
-->[[Component/FaceDown|FaceDown]] • <!--
-->[[Component/GravestoneSpy|GravestoneSpy]]* • <!--
-->[[Component/MarkedForDeath|MarkedForDeath]] • <!--
-->[[Component/Mustache|Mustache]] • <!--
-->[[Component/Unhealable|Unhealable]]<!--
-->{{Navbox|child
|group1=Not for cards
|list1=<!--
-->[[Component/GrassTerrain|GrassTerrain]] • <!--
-->[[Component/Graveyard|Graveyard]] • <!--
-->[[Component/HighgroundTerrain|HighgroundTerrain]] • <!--
-->[[Component/Lane|Lane]] • <!--
-->[[Component/Player|Player]] • <!--
-->[[Component/WaterTerrain|WaterTerrain]]
}}
|list4=<nowiki/>* Vanilla [[cards.json]] never uses these as components, but they can still be checked using [[Query/HasComponent|HasComponent]] and [[Query/LacksComponent|LacksComponent]] queries.
}}
|list2={{Navbox|child
|title=[[Component#Effect entity components|Effect entity components]]
|state={{{state2|uncollapsed}}}
|group1=[[Component#Triggers|Triggers]]
|list1=<!--
-->[[Component/BuffTrigger|Buff]] • <!--
-->[[Component/CombatEndTrigger|CombatEnd]] • <!--
-->[[Component/DamageTrigger|Damage]] • <!--
-->[[Component/DestroyCardTrigger|DestroyCard]] • <!--
-->[[Component/DiscardFromPlayTrigger|DiscardFromPlay]] • <!--
-->[[Component/DrawCardTrigger|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetTrigger|DrawCardFromSubset]] • <!--
-->[[Component/EnterBoardTrigger|EnterBoard]] • <!--
-->[[Component/ExtraAttackTrigger|ExtraAttack]] • <!--
-->[[Component/HealTrigger|Heal]] • <!--
-->[[Component/LaneCombatEndTrigger|LaneCombatEnd]] • <!--
-->[[Component/LaneCombatStartTrigger|LaneCombatStart]] • <!--
-->[[Component/MoveTrigger|Move]] • <!--
-->[[Component/PlayTrigger|Play]] • <!--
-->[[Component/ReturnToHandTrigger|ReturnToHand]] • <!--
-->[[Component/RevealTrigger|Reveal]] • <!--
-->[[Component/RevealPhaseEndTrigger|RevealPhaseEnd]] • <!--
-->[[Component/SlowedTrigger|Slowed]] • <!--
-->[[Component/SurprisePhaseStartTrigger|SurprisePhaseStart]] • <!--
-->[[Component/TurnStartTrigger|TurnStart]]
|group2=[[Component#Filters|Filters]]
|list2=<!--
-->[[Component/PrimaryTargetFilter|PrimaryTarget]] • <!--
-->[[Component/SecondaryTargetFilter|SecondaryTarget]] • <!--
-->[[Component/SelfEntityFilter|SelfEntity]] • <!--
-->[[Component/SelfLaneEntityFilter|SelfLaneEntity]] • <!--
-->[[Component/TriggerSourceFilter|TriggerSource]] • <!--
-->[[Component/TriggerTargetFilter|TriggerTarget]]
|group3=[[Component#Effect descriptors|Effect descriptors]]
|list3=<!--
-->[[Component/AttackInLaneEffectDescriptor|AttackInLane]] • <!--
-->[[Component/BuffEffectDescriptor|Buff]] • <!--
-->[[Component/ChargeBlockMeterEffectDescriptor|ChargeBlockMeter]] • <!--
-->[[Component/CopyCardEffectDescriptor|CopyCard]] • <!--
-->[[Component/CopyStatsEffectDescriptor|CopyStats]] • <!--
-->[[Component/CreateCardEffectDescriptor|CreateCard]] • <!--
-->[[Component/CreateCardFromSubsetEffectDescriptor|CreateCardFromSubset]] • <!--
-->[[Component/CreateCardInDeckEffectDescriptor|CreateCardInDeck]] • <!--
-->[[Component/DamageEffectDescriptor|Damage]] • <!--
-->[[Component/DestroyCardEffectDescriptor|DestroyCard]] • <!--
-->[[Component/DrawCardEffectDescriptor|DrawCard]] • <!--
-->[[Component/DrawCardFromSubsetEffectDescriptor|DrawCardFromSubset]] • <!--
-->[[Component/ExtraAttackEffectDescriptor|ExtraAttack]] • <!--
-->[[Component/GainSunEffectDescriptor|GainSun]] • <!--
-->[[Component/GrantAbilityEffectDescriptor|GrantAbility]] • <!--
-->[[Component/GrantTriggeredAbilityEffectDescriptor|GrantTriggeredAbility]] • <!--
-->[[Component/HealEffectDescriptor|Heal]] • <!--
-->[[Component/MixedUpGravediggerEffectDescriptor|MixedUpGravedigger]] • <!--
-->[[Component/ModifySunCostEffectDescriptor|ModifySunCost]] • <!--
-->[[Component/MoveCardToLanesEffectDescriptor|MoveCardToLanes]] • <!--
-->[[Component/ReturnToHandFromPlayEffectDescriptor|ReturnToHandFromPlay]] • <!--
-->[[Component/SetStatEffectDescriptor|SetStat]] • <!--
-->[[Component/SlowEffectDescriptor|Slow]] • <!--
-->[[Component/TransformIntoCardFromSubsetEffectDescriptor|TransformIntoCardFromSubset]] • <!--
-->[[Component/TurnIntoGravestoneEffectDescriptor|TurnIntoGravestone]]
|group4=[[Component#Multipliers|Multipliers]]
|list4=<!--
-->[[Component/DrawnCardCostMultiplier|DrawnCardCost]] • <!--
-->[[Component/HeroHealthMultiplier|HeroHealth]] • <!--
-->[[Component/QueryMultiplier|Query]] • <!--
-->[[Component/SunGainedMultiplier|SunGained]] • <!--
-->[[Component/TargetAttackMultiplier|TargetAttack]] • <!--
-->[[Component/TargetAttackOrHealthMultiplier|TargetAttackOrHealth]] • <!--
-->[[Component/TargetHealthMultiplier|TargetHealth]]
|group5=[[Component#Conditions|Conditions]]
|list5=<!--
-->[[Component/EffectValueCondition|EffectValue]] • <!--
-->[[Component/OncePerGameCondition|OncePerGame]] • <!--
-->[[Component/OncePerTurnCondition|OncePerTurn]] • <!--
-->[[Component/PlayerInfoCondition|PlayerInfo]] • <!--
-->[[Component/QueryEntityCondition|QueryEntity]]
|group6=[[Component#Others|Others]]
|list6=<!--
-->[[Component/ActiveTargets|ActiveTargets]] • <!--
-->[[Component/Continuous|Continuous]] • <!--
-->[[Component/DamageEffectRedirector|DamageEffectRedirector]] • <!--
-->[[Component/DamageEffectRedirectorDescriptor|DamageEffectRedirectorDescriptor]] • <!--
-->[[Component/EffectEntityGrouping|EffectEntityGrouping]] • <!--
-->[[Component/EffectValueDescriptor|EffectValueDescriptor]] • <!--
-->[[Component/HeraldEntities|HeraldEntities]] • <!--
-->[[Component/PersistsAfterTransform|PersistsAfterTransform]] • <!--
-->[[Component/TransformWithCreationSource|TransformWithCreationSource]]
}}
}}<noinclude>[[Category:Navbox template]]</noinclude>
7386acfe43d7519482aac02e394795310d670e89
Template:Queries
10
55
107
2023-12-15T18:45:30Z
HyperNervie
2
Created page with "{{Navbox |name={{subst:PAGENAME}} |title=[[Query|Queries]] |state={{{state|uncollapsed}}} |list1=<!-- -->[[Query/AdjacentLane|AdjacentLane]] • <!-- -->[[Query/AlwaysMatches|AlwaysMatches]] • <!-- -->[[Query/AttackComparison|AttackComparison]] • <!-- -->[[Query/BehindSameLane|BehindSameLane]] • <!-- -->[[Query/BlockMeterValue|BlockMeterValue]] • <!-- -->[[Query/CardGuid|CardGuid]] • <!-- -->[[Query/CompositeAll|CompositeAll]] • <!-- -->[..."
wikitext
text/x-wiki
{{Navbox
|name=Queries
|title=[[Query|Queries]]
|state={{{state|uncollapsed}}}
|list1=<!--
-->[[Query/AdjacentLane|AdjacentLane]] • <!--
-->[[Query/AlwaysMatches|AlwaysMatches]] • <!--
-->[[Query/AttackComparison|AttackComparison]] • <!--
-->[[Query/BehindSameLane|BehindSameLane]] • <!--
-->[[Query/BlockMeterValue|BlockMeterValue]] • <!--
-->[[Query/CardGuid|CardGuid]] • <!--
-->[[Query/CompositeAll|CompositeAll]] • <!--
-->[[Query/CompositeAny|CompositeAny]] • <!--
-->[[Query/DamageTakenComparison|DamageTakenComparison]] • <!--
-->[[Query/DrawnCard|DrawnCard]] • <!--
-->[[Query/Fighter|Fighter]] • <!--
-->[[Query/HasComponent|HasComponent]] • <!--
-->[[Query/InAdjacentLane|InAdjacentLane]] • <!--
-->[[Query/InEnvironment|InEnvironment]] • <!--
-->[[Query/InHand|InHand]] • <!--
-->[[Query/InLane|InLane]] • <!--
-->[[Query/InLaneAdjacentToLane|InLaneAdjacentToLane]] • <!--
-->[[Query/InLaneSameAsLane|InLaneSameAsLane]] • <!--
-->[[Query/InOneTimeEffectZone|InOneTimeEffectZone]] • <!--
-->[[Query/InSameLane|InSameLane]] • <!--
-->[[Query/InUnopposedLane|InUnopposedLane]] • <!--
-->[[Query/IsActive|IsActive]] • <!--
-->[[Query/IsAlive|IsAlive]] • <!--
-->[[Query/KilledBy|KilledBy]] • <!--
-->[[Query/LacksComponent|LacksComponent]] • <!--
-->[[Query/LaneOfIndex|LaneOfIndex]] • <!--
-->[[Query/LaneWithMatchingEnvironment|LaneWithMatchingEnvironment]] • <!--
-->[[Query/LaneWithMatchingFighter|LaneWithMatchingFighter]] • <!--
-->[[Query/LastLaneOfSelf|LastLaneOfSelf]] • <!--
-->[[Query/Not|Not]] • <!--
-->[[Query/OnTerrain|OnTerrain]] • <!--
-->[[Query/OpenLane|OpenLane]] • <!--
-->[[Query/OriginalTargetCardGuid|OriginalTargetCardGuid]] • <!--
-->[[Query/SameFaction|SameFaction]] • <!--
-->[[Query/SameLane|SameLane]] • <!--
-->[[Query/SameLaneAsTarget|SameLaneAsTarget]] • <!--
-->[[Query/Self|Self]] • <!--
-->[[Query/Source|Source]] • <!--
-->[[Query/SpringboardedOnSelf|SpringboardedOnSelf]] • <!--
-->[[Query/Subset|Subset]] • <!--
-->[[Query/Subtype|Subtype]] • <!--
-->[[Query/SunCostComparison|SunCostComparison]] • <!--
-->[[Query/SunCostPlusNComparison|SunCostPlusNComparison]] • <!--
-->[[Query/SunCounterComparison|SunCounterComparison]] • <!--
-->[[Query/Target|Target]] • <!--
-->[[Query/TargetCardGuid|TargetCardGuid]] • <!--
-->[[Query/TargetableInPlayFighter|TargetableInPlayFighter]] • <!--
-->[[Query/Trick|Trick]] • <!--
-->[[Query/TurnCount|TurnCount]] • <!--
-->[[Query/WasInSameLaneAsSelf|WasInSameLaneAsSelf]] • <!--
-->[[Query/WillTriggerEffects|WillTriggerEffects]] • <!--
-->[[Query/WillTriggerOnDeathEffects|WillTriggerOnDeathEffects]]
}}<noinclude>[[Category:Navbox template]]</noinclude>
d0fe23d95274de5a9b1f14d24dfeeaa5c5eff06e
Component/Card
0
9
108
18
2023-12-16T07:54:13Z
HyperNervie
2
wikitext
text/x-wiki
<syntaxhighlight lang="json">
{
"$type": "PvZCards.Engine.Components.Card, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {
"Guid": /* a positive integer */
}
}
</syntaxhighlight>
<code class="str">PvZCards.Engine.Components.Card</code> is a [[card entity component]] that identifies the GUID of a card. Each card must have this component in their card entity.
== JSON treeview ==
<div class="treeview">
* <code class="key object"></code><code class="key">$data</code> object of the component.
** <code class="key number">Guid</code>: The card's GUID. Must match the key that the card definition object in [[cards.json]] is associated with.
</div>
{{Components|state2=collapsed}}
[[Category:Card entity component]]
665e1e27eb189cfea5c457139955f108d90c6a6a
Cards.json
0
8
109
17
2023-12-16T08:02:05Z
HyperNervie
2
wikitext
text/x-wiki
'''cards.json''' is where stats and abilities of cards are defined. By editing this file, cards may behave differently during gameplay.
On the Android version, cards.json is located in the <code>Android/data/com.ea.gp.pvzheroes/files/cache/bundles/files/loc/card_data_172</code> bundle.
== JSON structure ==
cards.json notates an object that holds the definition of all cards of the game. The object uses card [[Glossary#GUID|GUIDs]] as keys, and the values are '''card definition objects''' that define cards with corresponding GUIDs.
<syntaxhighlight lang="json">
{
"1": {
/* Definition object of card #1 */
},
"2": {
/* Definition object of card #2 */
},
"3": {
/* Definition object of card #3 */
},
/* And so on... */
}
</syntaxhighlight>
Card definition objects hold the following structure:
<tabber>
|-|Treeview=
<div class="treeview">
* <code class="key object"></code>The card definition object.
** <code class="key object">entity</code>: A card entity object. How a card actually behaves during gameplay is defined by this object.
*** <code class="key list">components</code>: A list of card entity components which determines the actual behaviors of the card.
**** <code class="key object"></code>Each element of the list is a card entity component object. See [[card entity component]] for details.
** <code class="key string">prefabName</code>: The [[Glossary#Prefab|prefab]] name of the card.
** <code class="key string">baseId</code>: Type of the card. See [[#Card types]] for possible values.
** <code class="key string">color</code>: Class of the card. See [[#Classes]] for possible values.
** <code class="key string">set</code>: Set of the card. See [[#Sets]] for possible values.
** <code class="key number">rarity</code>: Rarity of the card. See [[#Rarities]] for possible values.
** <code class="key string">setAndRarityKey</code>: Translation key of the card's set and rarity. See [[#Set-and-rarity keys]] for possible values.
** <code class="key number">craftingBuy</code>: Sparks spent for crafting a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card costs, which is server-side. This field doesn't exist for Superpowers and Tokens.
** <code class="key number">craftingSell</code>: Sparks returned for recycling a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card returns, which is server-side. This field doesn't exist for Superpowers, Tokens and Basic Common cards.
** <code class="key number">displayHealth</code>: The Health value displayed on the cardface. Use the [[Component/Health|Health]] component to set the Fighter's actual Health. For Tricks and Environments, this should be set to <code class="num">0</code>.
** <code class="key number">displayAttack</code>: The Strength value displayed on the cardface. Use the [[Component/Attack|Attack]] component to set the Fighter's actual Strength. For Tricks and Environments, this should be set to <code class="num">0</code>.
** <code class="key number">displaySunCost</code>: The Sun/Brain cost value displayed on the cardface. Use the [[Component/SunCost|SunCost]] component to set the card's actual cost. This field is still named "display''Sun''Cost" when the card belongs to Zombie faction and costs Brains.
** <code class="key string">faction</code>: Faction where the card belongs. See [[#Factions]] for possible values.
** <code class="key bool">ignoreDeckLimit</code>: Purpose unknown.
** <code class="key bool">isPower</code>: Whether this card is a Superpower. Use the [[Component/Superpower|Superpower]] component to make the card actual Superpower.
** <code class="key bool">isPrimaryPower</code>: Whether this card is a Signature Superpower. Use the [[Component/PrimarySuperpower|PrimarySuperpower]] component to make the card actual Signature Superpower.
** <code class="key bool">isFighter</code>: Whether this card is a Fighter.
** <code class="key bool">isEnv</code>: Whether this card is an Environment.
** <code class="key bool">isAquatic</code>: Whether this card is Amphibious. Use the [[Component/Aquatic|Aquatic]] component to make the card actually Amphibious.
** <code class="key bool">isTeamup</code>: Whether this card has Team-Up. Use the [[Component/Teamup|Teamup]] component to make the card actually have Team-Up.
** <code class="key list">subtypes</code>: A list of the card's subtypes (often referred to as "tribes" in player community). Use the [[Component/Subtypes|Subtypes]] component to set the card's actual subtypes.
*** <code class="key string"></code>Each element of the list is a string that indicates a subtype. See [[Component/Subtypes#Possible subtypes]] for possible values.
** <code class="key list">tags</code>: A list of the card's tags. Some card interactions may rely on tags. Use the [[Component/Tags|Tags]] component to set the card's actual tags.
*** <code class="key string"></code>Each element of the list is a string that indicates a tag. Tag strings can be arbitrary.
** <code class="key list">subtype_affinities</code>: A list of subtypes that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key string"></code>Each element of the list is a string that indicates a subtype.
** <code class="key list">subtype_affinity_weight</code>: Affinity weights of the subtypes in the <code class="key">subtype_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective subtype of <code class="key">subtype_affinities</code>.
** <code class="key list">tag_affinities</code>: A list of tags that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key string"></code>Each element of the list is a string that indicates a tag.
** <code class="key list">tag_affinity_weight</code>: Affinity weights of the tags in the <code class="key">tag_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective tag of <code class="key">tag_affinities</code>.
** <code class="key list">card_affinities</code>: A list of cards that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key number"></code>Each element of the list is an integer that indicates the GUID of a card.
** <code class="key list">card_affinity_weight</code>: Affinity weights of the cards in the <code class="key">card_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective card of <code class="key">card_affinities</code>.
** <code class="key bool">usable</code>: Whether this card is usable during gameplay. Use the [[Component/Unusable|Unusable]] component to make the card actually unusable.
** <code class="key list">special_abilities</code>: A list of the card's special abilities. It affects the Strength and Health icons ''on the cardface''. For Tricks and Environments, this list should be empty. To set the actual abilities of a card, use proper components in the card entity.
*** <code class="key string"></code>Each element of the list is a string that indicates a special ability. See [[#Special abilities]] for possible values.
</div>
|-|Source=
<syntaxhighlight lang="json">
{
"entity": {
"components": [
/* list of card entity components */
]
},
"prefabName": /* a string */,
"baseId": /* a string */,
"color": /* a string */,
"set": /* a string */,
"rarity": /* an integer */,
"setAndRarity": /* a string */,
"craftingBuy": /* an integer */,
"craftingSell": /* an integer */,
"displayHealth": /* an integer */,
"displayAttack": /* an integer */,
"displaySunCost": /* an integer */,
"faction": /* a string */,
"ignoreDeckLimit": /* true or false */,
"isPower": /* true or false */,
"isPrimaryPower": /* true or false */,
"isFighter": /* true or false */,
"isEnv": /* true or false */,
"isAquatic": /* true or false */,
"isTeamup": /* true or false */,
"subtypes": [
/* list of strings */
],
"tags": [
/* list of strings */
],
"subtype_affinities": [
/* list of strings */
],
"subtype_affinity_weights": [
/* list of numbers */
],
"tag_affinities": [
/* list of strings */
],
"tag_affinity_weights": [
/* list of numbers */
],
"card_affinities": [
/* list of GUIDs */
],
"card_affinity_weights": [
/* list of numbers */
],
"usable": /* true or false */,
"special_abilities": [
/* list of strings */
]
}
</syntaxhighlight>
</tabber>
== Example of card definition ==
Let's take the first card in cards.json - [[pvzwiki:Guacodile (PvZH)|Guacodile]] - for example:
<syntaxhighlight lang="json">
{
"entity": {
"components": [
/* tl;dr */
]
},
"prefabName": "2f9fa005-8b50-4d1a-89be-38e4a82036c4",
"baseId": "Base",
"color": "Guardian",
"set": "Gold",
"rarity": 2,
"setAndRarityKey": "Bloom_SuperRare",
"craftingBuy": 1000,
"craftingSell": 250,
"displayHealth": 3,
"displayAttack": 4,
"displaySunCost": 4,
"faction": "Plants",
"ignoreDeckLimit": false,
"isPower": false,
"isPrimaryPower": false,
"isFighter": true,
"isEnv": false,
"isAquatic": true,
"isTeamup": false,
"subtypes": [
"Fruit",
"Animal"
],
"tags": [
"destroy",
"anyplantfighter",
"anyaquaticplantfighter",
"notpineclone",
"aquatic",
"cost6orless",
"randomplantcard"
],
"subtype_affinities": [],
"subtype_affinity_weights": [],
"tag_affinities": [],
"tag_affinity_weights": [],
"card_affinities": [
8,
462
],
"card_affinity_weights": [
1.2,
1.2
],
"usable": true,
"special_abilities": [
"Unique"
]
}
</syntaxhighlight>
This means: the prefab name of the card is <code class="str">2f9fa005-8b50-4d1a-89be-38e4a82036c4</code>; it is a Plant of Guardian Class; its set and rarity is Premium - Super-Rare; crafting a copy of this card costs 1000 Sparks; recycling a copy of this card returns 250 Sparks; it is a 4-Cost 4/3 non-Superpower Fighter; it is Amphibious; it doesn't have Team-Up; it is of Fruit and Animal subtypes; it is usable during gameplay; it has a Unique ability (its "When destroyed" ability) and thus has a golden star below the middle of its Strength and Health icons.
== Details ==
=== Card types ===
The <code class="key">baseId</code> field of a card definition object identifies the outward type of the card.
{| class="wikitable"
! Value of <code class="key">baseId</code> !! Card type
|-
| <code class="str">"Base"</code> || Plant
|-
| <code class="str">"BaseZombie"</code> || Zombie
|-
| <code class="str">"BasePlantOneTimeEffect"</code> || Plant Trick
|-
| <code class="str">"BaseZombieOneTimeEffect"</code> || Zombie Trick
|-
| <code class="str">"BasePlantEnvironment"</code> || Plant Environment
|-
| <code class="str">"BaseZombieEnvironment"</code> || Zombie Environment
|}
The <code class="key">isFighter</code> and <code class="key">isEnv</code> fields also indicates the card type.
{| class="wikitable"
! Value of <code class="key">isFighter</code> !! Value of <code class="key">isEnv</code> !! Card type
|-
| <code class="keyword">true</code> || <code class="keyword">false</code> || Plant or Zombie
|-
| <code class="keyword">false</code> || <code class="keyword">false</code> || Trick
|-
| <code class="keyword">false</code> || <code class="keyword">true</code> || Environment
|}
To make a card actual Fighter, Trick or Environment, use neither or either of [[Component/Burst|Burst]] and [[Component/Environment|Environment]] components in the card entity.
=== Classes ===
The <code class="key">baseId</code> field of a card definition object identifies the Class(es) of the card. It decides the background color of the cardface.
{| class="wikitable"
! Value of <code class="key">color</code> !! Class
|-
| <code class="str">"Guardian"</code> || Guardian
|-
| <code class="str">"Kabloom"</code> || Kabloom
|-
| <code class="str">"MegaGro"</code> || Mega-Grow
|-
| <code class="str">"Smarty"</code> || Smarty
|-
| <code class="str">"Solar"</code> || Solar
|-
| <code class="str">"Hungry"</code> || Beastly
|-
| <code class="str">"Brainy"</code> || Brainy
|-
| <code class="str">"Madcap"</code> || Crazy
|-
| <code class="str">"Hearty"</code> || Hearty
|-
| <code class="str">"Sneaky"</code> || Sneaky
|-
| <code class="str">"0"</code> || (No Class)
|}
If a card has two Classes, separate the Class names with a comma. (e.g. <code class="str">"Guardian, Kabloom"</code>, whitespace is optional)
Classes play no role during gameplay. Thus there are no Class components for card entities. They make a difference only when you're building a deck.
=== Sets ===
The <code class="key">set</code> field of a card definition object identifies the set of the card.
{| class="wikitable"
! Value of <code class="key">set</code> !! Set
|-
| <code class="str">"Hero"</code> || Signature Superpower
|-
| <code class="str">"Superpower"</code> || Non-signature Superpower
|-
| <code class="str">"Token"</code> || Token
|-
| <code class="str">"Silver"</code> || Basic
|-
| <code class="str">"Gold"</code> || Premium
|-
| <code class="str">"Set2"</code> || Galactic Garden
|-
| <code class="str">"Set3"</code> || Colossal Fossil
|-
| <code class="str">"Set4"</code> || Triassic Triumph
|-
| <code class="str">"Event"</code> || Event
|-
| <code class="str">""</code> || Removed Superpower
|-
| <code class="str">"Blank"</code> || Blank
|-
| <code class="str">"Cheats"</code> || Cheats
|-
| <code class="str">"Board"</code> || Board Ability
|}
=== Rarities ===
The <code class="key">rarity</code> field of a card definition object identifies the outward rarity of the card. This affects the banner shown at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">rarity</code> !! Rarity
|-
| <code class="num">0</code> || Uncommon
|-
| <code class="num">1</code> || Rare
|-
| <code class="num">2</code> || Super-Rare
|-
| <code class="num">3</code> || Legendary
|-
| <code class="num">4</code> || Common or Token
|-
| <code class="num">5</code> || Event
|}
Use the [[Component/Rarity|Rarity]] component to set the actual rarity used in gameplay.
=== Set-and-rarity keys ===
The <code class="key">setAndRarityKey</code> field of a card definition object identifies the translation key of the card's set and rarity. The localization is shown on the banner at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">setAndRarityKey</code> !! Localization !! Note
|-
| <code class="str">"Superpower_SuperRare"</code> || Super-Rare || For Non-signature Superpowers
|-
| <code class="str">"Dawn_Common"</code> || Basic - Common ||
|-
| <code class="str">"Bloom_Common"</code> || Premium - Uncommon ||
|-
| <code class="str">"Bloom_Rare"</code> || Premium - Rare ||
|-
| <code class="str">"Bloom_SuperRare"</code> || Premium - Super-Rare ||
|-
| <code class="str">"Bloom_Legendary"</code> || Premium - Legendary ||
|-
| <code class="str">"Galactic_Common"</code> || Galactic - Uncommon ||
|-
| <code class="str">"Galactic_Rare"</code> || Galactic - Rare ||
|-
| <code class="str">"Galactic_SuperRare"</code> || Galactic - Super-Rare ||
|-
| <code class="str">"Galactic_Legendary"</code> || Galactic - Legendary ||
|-
| <code class="str">"Colossal_Common"</code> || Colossal - Uncommon ||
|-
| <code class="str">"Colossal_Rare"</code> || Colossal - Rare ||
|-
| <code class="str">"Colossal_SuperRare"</code> || Colossal - Super-Rare ||
|-
| <code class="str">"Colossal_Legendary"</code> || Colossal - Legendary ||
|-
| <code class="str">"Triassic_Common"</code> || Triassic - Uncommon || rowspan=4 | English localizations for these four keys are absent due to unknown reasons.
|-
| <code class="str">"Triassic_Rare"</code> || Triassic - Rare
|-
| <code class="str">"Triassic_SuperRare"</code> || Triassic - Super-Rare
|-
| <code class="str">"Triassic_Legendary"</code> || Triassic - Legendary
|-
| <code class="str">"Token"</code> || Token ||
|-
| <code class="str">"Premium_Event"</code> || Event ||
|-
| <code class="str">""</code> or <code class="keyword">null</code> || || No translation key
|}
=== Factions ===
The <code class="key">faction</code> field of a card definition object identifies the outward faction of the card. Use respective component in the card entity to set the actual faction.
{| class="wikitable"
! Value of <code class="key">faction</code> !! Faction !! Required component
|-
| <code class="str">"Plants"</code> || Plant || [[Component/Plants|Plants]]
|-
| <code class="str">"Zombies"</code> || Zombie || [[Component/Zombies|Zombies]]
|-
| <code class="str">"All"</code> || Board || [[Component/BoardAbility|BoardAbility]]
|}
=== Special abilities ===
The <code class="key">special_abilties</code> list of a card definition object determines the ability icons shown ''on the cardface''.
{| class="wikitable"
! String value !! Ability
|-
| <code class="str">"Ambush"</code> || Anti-Hero
|-
| <code class="str">"Armor"</code> || Armored
|-
| <code class="str">"AttackOverride"</code> || Attack using Health
|-
| <code class="str">"Truestrike"</code> || Bullseye
|-
| <code class="str">"Deadly"</code> || Deadly
|-
| <code class="str">"Repeater"</code> || Double Strike
|-
| <code class="str">"Frenzy"</code> || Frenzy
|-
| <code class="str">"Overshoot"</code> || Overshoot
|-
| <code class="str">"Strikethrough"</code> || Strikethrough
|-
| <code class="str">"Unique"</code> || Unique
|-
| <code class="str">"Untrickable"</code> || Untrickable
|}
If an ability...
* doesn't match any of the abilities listed in the table above (except Unique)
* is not Aquatic, Team-Up nor Gravestone
* is not a "When played", "When revealed" or "While in your hand" ability
Then it matches Unique. The icon for Unique is a golden star below the middle of the Strength and Health icons.
To affect the Strength and Health icons used when the Fighter is ''in play'', use the [[Component/ShowTriggeredIcon|ShowTriggeredIcon]] component in the card entity.
[[Category:Game asset]]
8df58c86cb270e67aa463babda8491f27c141fbd
Glossary
0
6
112
6
2023-12-16T13:35:14Z
HyperNervie
2
wikitext
text/x-wiki
; <span id="card definition object">Card definition object</span>
: The value objects of the object notated by [[cards.json]]. Each of them defines a card.
; <span id="card entity">Card entity</span>
: When you're having a match, cards are instantiated as card entities that determine the properties and behaviors of cards. See [[#game entity|game entity]] for more.
: The <code class="key">entity</code> field of the [[#card definition object|card definition object]] defines the card entity of a card.
; <span id="card entity component">Card entity component</span>
: A card entity component determines a subset of a card's properties and behaviors. By putting a set of components in a card entity, the card entity is fully determined.
; <span id="game entity">Game entity</span>
: When you're having a match, Heroes, cards and lanes are instantiated as game entities. They interact with each other and make up your gameplay. Each of them has a [[component]] that defines their entity type:
:* A Hero entity has a [[Component/Player|Player]] component.
:* A card entity has a [[Component/Card|Card]] component.
:* A lane entity has a [[Component/Lane|Lane]] component.
:** A Heights lane entity has a [[Component/HighgroundTerrain|HighgroundTerrain]] component.
:** A Ground lane entity has a [[Component/GrassTerrain|GrassTerrain]] component.
:** A Water lane entity has a [[Component/WaterTerrain|WaterTerrain]] component.
: Note that Heroes and cards you see in your collection screen are not instantiated as game entities.
; <span id="GUID">GUID</span>
: Short for "'''g'''lobally '''u'''nique '''id'''entifier". Each card has a positive integer as its GUID.
4beb55a9d6357044200e5e9cef6ef9b4aafbf3ee
Component
0
56
114
2023-12-16T15:51:00Z
HyperNervie
2
Created page with "'''Components''' are what constitute [[Glossary#game entity|game entities]] or [[Glossary#effect entity|effect entities]]. Each component defines a subset of an entity's properties and behaviors so that an entity can be defined with a set of components. In [[cards.json]], components are represented as objects of the following structure: <tabber> |-|Treeview= <div class="treeview"> * <code class="key object"></code>The component object. ** <code class="key string">$type<..."
wikitext
text/x-wiki
'''Components''' are what constitute [[Glossary#game entity|game entities]] or [[Glossary#effect entity|effect entities]]. Each component defines a subset of an entity's properties and behaviors so that an entity can be defined with a set of components.
In [[cards.json]], components are represented as objects of the following structure:
<tabber>
|-|Treeview=
<div class="treeview">
* <code class="key object"></code>The component object.
** <code class="key string">$type</code>: Type of the component, formatted in <code class="str">"PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <ComponentType> component, and it is documented on an individual page named "Component/<ComponentType>" on this wiki.
** <code class="key object">$data</code>: Data of the component. Different types of components may require data objects of different structures, which are discussed in their individual pages.
</div>
|-|Source=
<syntaxhighlight lang="json">
{
"$type": "PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {
/* data of the component */
}
}
</syntaxhighlight>
</tabber>
If a component constitutes a [[Glossary#card entity|card entity]], it is a '''card entity component'''. Likewise, a component is an '''effect entity components''' if it constitutes an effect entity.
== Card entity components ==
'''Card entity components''' are components used in card entities that determine the behaviors of a card ''during gameplay''.
=== Required ===
Each card entity ''must'' have these components:
; [[Component/Card|Card]]
: Mark the game entity as a card and set its [[Glossary#GUID|GUID]].
; [[Component/SunCost|SunCost]]
: Set the Sun/Brain cost of the card.
; [[Component/Rarity|Rarity]]
: Set the rarity of the card.
; Either or neither of
:; [[Component/Burst|Burst]]
:: Make the card Trick.
:; [[Component/Environment|Environment]]
:: Make the card Environment.
: Use neither to make the card Fighter.
; One and only one of
:; [[Component/BoardAbility|BoardAbility]]
:: Make the card Board Ability.
:; [[Component/Plants|Plants]]
:: Make the card belong to the Plant faction.
:; [[Component/Zombies|Zombies]]
:: Make the card belong to the Zombie faction.
=== Optional ===
These are optional components that can be used in the card entities of cards.json:
; [[Component/Aquatic|Aquatic]]
: Make the Fighter Amphibious.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Armor|Armor]]
: Make the Fighter Armored.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Attack|Attack]]
: Set the Strength of the Fighter. This can be omitted if the Fighter has no Strength.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/AttackOverride|AttackOverride]]
: Make the Fighter attack using its Health instead.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/AttacksInAllLanes|AttacksInAllLanes]]
: Make the Fighter attack in all five lanes.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/AttacksOnlyInAdjacentLanes|AttacksOnlyInAdjacentLanes]]
: Make the Fighter attack in its adjacent lanes instead of its own lane.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/CreateInFront|CreateInFront]]
: When created on a lane with a Friendly Fighter, make this card in front of that Friendly Fighter. Without this component, this card will be created behind that Friendly Fighter.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Deadly|Deadly]]
: Make the card Deadly.
: This ''can'' be used on Plants, Tricks and Environments despite none of them having Deadly in vanilla cards.json.
; [[Component/EffectEntitiesDescriptor|EffectEntitiesDescriptor]]
: Define the card's effect entities (i.e. its unique abilities).
; [[Component/EvolutionRestriction|EvolutionRestriction]]
: Decide which Fighters this Fighter can evolve on. Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Evolvable|Evolvable]]
: Make the Fighter evolvable on other Fighters (i.e. Blahblah Evolution). Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Frenzy|Frenzy]]
: Give the Fighter Frenzy.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/FromBurst|FromBurst]]
: Purpose unconfirmed.
; [[Components/GrantedTriggeredAbilities|GrantedTriggeredAbilities]]
: Grant the effect entities of another card to this card.
; [[Component/Health|Health]]
: Set the Health of the Fighter.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Multishot|Multishot]]
: Make the Fighter attack in its own lane and its adjacent lanes.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/PlaysFaceDown|PlaysFaceDown]]
: Hide the Zombie in a Gravestone when played from hand. Not to be confused with [[Component/FaceDown|FaceDown]].
: This ''cannot'' be used on Plants, Tricks and Environments.
; [[Component/PrimarySuperpower|PrimarySuperpower]]
: Make the card Signature Superpower.
; [[Component/ShowTriggeredIcon|ShowTriggeredIcon]]
: Change the Fighter's Strength/Health icons to indicate its triggered abilities.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/SplashDamage|SplashDamage]]
: Make the Fighter do damage to Enemy Fighters next door when it attacks.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Springboard|Springboard]]
: Make other Fighters able to be played on this Fighter (i.e. Fusion).
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Strikethrough|Strikethrough]]
: Give the Fighter Strikethrough.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Subtypes|Subtypes]]
: Set the subtypes (often referred to as "tribes" in player community) of the card.
: This can be omitted if the card has no subtypes.
; [[Component/Superpower|Superpower]]
: Make the card Superpower.
; [[Component/Surprise|Surprise]]
: Make AI tend to reserve this card.
; [[Component/Tags|Tags]]
: Set the tags of the card. Tags can't be reflected from game texts, but they do affect some interactions between cards.
: This can be omitted if the card has no subtypes.
; [[Component/Teamup|Teamup]]
: Give the Fighter Team-Up.
: This ''can'' be used on Zombies despite none of them having Team-Up in vanilla cards.json.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Truestrike|Truestrike]]
: Give the card Bullseye.
: This ''can'' be used on Tricks and Environments despite none of them having Bullseye in vanilla cards.json.
; [[Component/Untrickable|Untrickable]]
: Make the card Untrickable.
: This ''cannot'' be used on Tricks and Environments.
; [[Component/Unusable|Unusable]]
: Make the card unusable during gameplay.
=== Forbidden ===
These components ''cannot'' be used in the card entities of cards.json (in another word, you can't make cards "born" with these components). Technically, some of them are general game entity components as they can be used on game entities like Heroes and lanes, while some of them are not even card entity components as they can be used only on game entities that are not card entities.
Although these are forbidden in card entities of cards.json, some of them can be applied on game entities by other means. The structures of the <code class="key">$data</code> objects of these components are unknown.
; [[Component/CanPlayFighterInSurprisePhase|CanPlayFighterInSurprisePhase]]
: Make the Zombie Hero able to play Zombies during their Trick phase. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; [[Component/DamageImmunity|DamageImmunity]]
: Purpose unconfirmed.
; [[Component/Evolved|Evolved]]
: Mark that the Fighter has evolved on another Fighter,
; [[Component/FaceDown|FaceDown]]
: Mark that the Zombie is hiding in a Gravestone. Not to be confused with [[Component/PlaysFaceDown|PlaysFaceDown]].
; [[Component/GrassTerrain|GrassTerrain]]
: Mark the game entity as a Ground lane.
; [[Component/GravestoneSpy|GravestoneSpy]]
: Make the Plant Hero able to see which Zombies are hiding in Gravestones. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; [[Component/Graveyard|Graveyard]]
: Purpose unconfirmed.
; [[Component/HighgroundTerrain|HighgroundTerrain]]
: Mark the game entity as a Heights lane.
; [[Component/Lane|Lane]]
: Mark the game entity as a lane.
; [[Component/MarkedForDeath|MarkedForDeath]]
: Purpose unconfirmed.
; [[Component/Mustache|Mustache]]
: If the Fighter doesn't belong to the Mustache subtype, attach a mustache to it. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; [[Component/Player|Player]]
: Mark the game entity as a Hero.
; [[Component/Unhealable|Unhealable]]
: Make the Hero or Fighter unable to get healed. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; [[Component/WaterTerrain|WaterTerrain]]
: Mark the game entity as a Water lane.
{{Components}}
[[Category:Glossary]]
e11eb1231f30432f8c097f609d880b9c5dbb93ff
File:Deadly.png
6
57
115
2023-12-16T17:25:42Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
133
115
2023-12-16T18:17:37Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Deadly.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Double Strike.png
6
58
116
2023-12-16T17:25:51Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
134
116
2023-12-16T18:17:44Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Double Strike.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Freeze.png
6
59
117
2023-12-16T17:26:04Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
135
117
2023-12-16T18:17:50Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Freeze.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Frenzy.png
6
60
118
2023-12-16T17:26:17Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Health.png
6
61
119
2023-12-16T17:26:20Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
136
119
2023-12-16T18:17:58Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Health.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Health-Attack.png
6
62
120
2023-12-16T17:26:23Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
137
120
2023-12-16T18:18:05Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Health-Attack.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Multi Trait.png
6
63
121
2023-12-16T17:26:40Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
138
121
2023-12-16T18:18:12Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Multi Trait.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Overshoot.png
6
64
122
2023-12-16T17:26:46Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
139
122
2023-12-16T18:18:19Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Overshoot.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Shielded.png
6
65
123
2023-12-16T17:26:51Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
140
123
2023-12-16T18:18:24Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Shielded.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Strength.png
6
66
124
2023-12-16T17:27:12Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
141
124
2023-12-16T18:18:38Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Strength.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Strikethrough.png
6
67
125
2023-12-16T17:27:18Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
142
125
2023-12-16T18:18:45Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Strikethrough.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Sun.png
6
68
126
2023-12-16T17:27:23Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
143
126
2023-12-16T18:18:52Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Sun.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Unique.png
6
69
127
2023-12-16T17:27:30Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Untrickable.png
6
70
128
2023-12-16T17:27:35Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Anti-Hero.png
6
71
129
2023-12-16T17:27:41Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Armored.png
6
72
130
2023-12-16T17:28:01Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Brain.png
6
73
131
2023-12-16T17:28:08Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Bullseye.png
6
74
132
2023-12-16T17:28:16Z
HyperNervie
2
File uploaded with MsUpload
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Unique.png
6
69
144
127
2023-12-16T18:18:58Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Unique.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Untrickable.png
6
70
145
128
2023-12-16T18:19:08Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Untrickable.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Armored.png
6
72
146
130
2023-12-16T18:19:23Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Armored.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Brain.png
6
73
147
131
2023-12-16T18:19:30Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Brain.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
File:Bullseye.png
6
74
148
132
2023-12-16T18:19:40Z
HyperNervie
2
HyperNervie uploaded a new version of [[File:Bullseye.png]]
wikitext
text/x-wiki
File uploaded with MsUpload
a655f04485ff507c02499d137d22a0d3e0ea32c2
Template:Icon
10
75
149
2023-12-16T18:30:58Z
HyperNervie
2
Created page with "<includeonly>File:{{#switch:{{lc:{{{1}}} }} |sun=Sun.png |brain=Brain.png |strength|attack=Strength.png |health=Health.png |multi=Multi Trait.png |star|unique=Unique.png |anti-hero|ambush=Anti-Hero.png |armored|armor=Armored.png |bullseye|truestrike=Bullseye.png |deadly=Deadly.png |double strike=Double Strike.png |frenzy=Frenzy.png |overshoot=Overshoot.png |strikethrough=Strikethrough.png |untrickable=Untrickable.png |freeze|freezes|frozen=Freeze.png |shielded|unhurtab..."
wikitext
text/x-wiki
<includeonly>[[File:{{#switch:{{lc:{{{1}}} }}
|sun=Sun.png
|brain=Brain.png
|strength|attack=Strength.png
|health=Health.png
|multi=Multi Trait.png
|star|unique=Unique.png
|anti-hero|ambush=Anti-Hero.png
|armored|armor=Armored.png
|bullseye|truestrike=Bullseye.png
|deadly=Deadly.png
|double strike=Double Strike.png
|frenzy=Frenzy.png
|overshoot=Overshoot.png
|strikethrough=Strikethrough.png
|untrickable=Untrickable.png
|freeze|freezes|frozen=Freeze.png
|shielded|unhurtable=Shielded.png
|health-attack|attackoverride=Health-Attack.png
}}|{{{size|20px}}}|link=]]</includeonly><noinclude>{{documentation}}</noinclude>
ec56f52af841cb5fdc1594730936e21fcc52fb47
Template:Mbox
10
76
151
150
2023-12-16T19:01:26Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
{{#invoke:Message box|mbox}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
c262e205f85f774a23f74119179ceea11751d68e
Template:Navbar
10
77
153
152
2023-12-16T19:01:26Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<noinclude>
<languages/>
</noinclude><templatestyles src="Module:Navbar/styles.css"/><span class="noprint plainlinks navbar" style="{{{style|}}}"><small><!--
-->{{#if:{{{mini|}}}{{{plain|}}}|<!--nothing-->|<!--else:
--><span style="{{{fontstyle|}}}">{{#if:{{{text|}}}|{{{text}}}|<translate><!--T:1--> This box:</translate>}} </span>}}<!--
-->{{#if:{{{brackets|}}}|<span style="{{{fontstyle|}}}">[</span>}}<!--
--><span style="white-space:nowrap;word-spacing:-.12em;"><!--
-->[[{{transclude|{{{1}}}}}|<span style="{{{fontstyle|}}}" title="<translate nowrap><!--T:2--> View this template</translate>"><!--
-->{{#if:{{{mini|}}}|<translate><!--T:3--> v</translate>|<translate><!--T:4--> view</translate>}}</span>]]<!--
--><span style="{{{fontstyle|}}}"> <b>·</b> </span><!--
-->[{{fullurl:{{<noinclude><nowiki/></noinclude>TALKPAGENAME:{{transclude|{{{1}}}}}}}}} <span style="{{{fontstyle|}}}" title="<translate nowrap><!--T:9--> Discuss this template</translate>"><!--
-->{{#if:{{{mini|}}}|<translate><!--T:5--> d</translate>|<translate><!--T:6--> talk</translate>}}</span>]<!--
-->{{#if:{{{noedit|}}}|<!--nothing-->|<!--else:
--><span style="{{{fontstyle|}}}"> <b>·</b> </span><!--
-->[{{fullurl:{{transclude|{{{1}}}}}|action=edit}} <span style="{{{fontstyle|}}}" title="<translate nowrap><!--T:10--> Edit this template</translate>"><!--
-->{{#if:{{{mini|}}}|<translate><!--T:7--> e</translate>|<translate><!--T:8--> edit</translate>}}</span>]}}<!--
--></span><!--
-->{{#if:{{{brackets|}}}|<span style="{{{fontstyle|}}}">]</span>}}<!--
--></small></span><noinclude>
{{Documentation|content=
{{Uses TemplateStyles|Module:Navbar/styles.css}}
<translate>
== Usage == <!--T:11-->
=== General === <!--T:12-->
<!--T:13-->
When one of the following examples is placed inside a given [[<tvar name=1>Special:MyLanguage/Help:Templates</tvar>|template]], it adds navbar navigational functionality:
</translate>
: {{tlx|Navbar|Navbar|mini{{=}}1}}
: {{tlx|Navbar|Navbar|plain{{=}}1}}
: {{tlx|Navbar|Navbar|fontstyle{{=}}color:green}}
<translate><!--T:14--> The <tvar name=1><code><nowiki>{{subst:PAGENAME}}</nowiki></code></tvar> will be substituted with the template's name when parsed by the servers.</translate>
<translate><!--T:15--> For example, <tvar name=1>{{tlx|Navbar|navbar/doc}}</tvar> gives:</translate>
{{Navbar|navbar/doc}}
<translate>
=== Font-size === <!--T:16-->
</translate>
<translate><!--T:17--> Font-size is <tvar name=1><code>88%</code></tvar> when used in a navbar, and <tvar name=2><code>100%</code></tvar> when nested in a navbox.</translate>
<translate><!--T:18--> In the navbar, the weight is "<tvar name=1><code>normal</code></tvar>"; when nested in navbox, it takes on the outer setting.</translate>
<translate><!--T:19--> The middot is bold.</translate>
<translate>
== Examples == <!--T:20-->
=== Required parameters === <!--T:21-->
</translate>
* {{tlx|Navbar|''<translate><!--T:22--> template name</translate>''}} — <translate><!--T:23--> the template name is required.</translate>
<translate>
=== Optional parameters === <!--T:24-->
</translate>
{{(}}{{!}} class="wikitable"
! <translate><!--T:25--> Options</translate>
! <translate><!--T:26--> Parameters</translate>
! <translate><!--T:27--> Produces...</translate>
{{!}}-
{{!}} <translate><!--T:28--> Basic</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:29--> template name</translate>''}}
{{!}} {{navbar|navbar/doc}}
{{!}}-
{{!}} <translate><!--T:30--> Different text</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:31--> template name</translate>''|3=text{{=}}<translate><!--T:32--> This template:</translate>}}
{{!}} {{navbar|navbar/doc|text=<translate><!--T:33--> This template:</translate>}}
{{!}}-
{{!}} <translate><!--T:34--> Without "This box:" text</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:35--> template name</translate>''|3=plain{{=}}1}}
{{!}} {{navbar|navbar/doc|plain=1}}
{{!}}-
{{!}} <translate><!--T:36--> Short version</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:37--> template name</translate>''|3=mini{{=}}1}}
{{!}} {{navbar|navbar/doc|mini=1}}
{{!}}-
{{!}} <translate><!--T:38--> With a color option</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:39--> template name</translate>''|3=fontstyle{{=}}color:green}}
{{!}} {{navbar|navbar/doc|fontstyle=color:green}}
{{!}}-
{{!}} <translate><!--T:40--> With brackets</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:41--> template name</translate>''|3=brackets{{=}}1}}
{{!}} {{navbar|navbar/doc|brackets=1}}
{{!}}-
{{!}} <translate><!--T:45--> Custom namespace</translate>
{{!}} {{tlx|Navbar|2=''<translate><!--T:46--> namespaced template name</translate>''|3=plain{{=}}1|4=brackets{{=}}1}}
{{!}} {{navbar|User:Example|plain=1|brackets=1}}
{{!}}{{)}}
== TemplateData ==
{{Navbar/doc}}
<translate>
== Notes == <!--T:42-->
</translate>
<translate><!--T:43--> Navbar is contained within a <tvar name=1>{{tag|div}}</tvar> in order to accommodate a horizontal unnumbered list.</translate>
<translate><!--T:44--> This means it cannot be placed inside a <tvar name=1>{{tag|span}}</tvar> or other inline element, because Tidy will 'fix' situations where it finds block elements inside inline elements.</translate>
<!--- PLEASE ADD METADATA TO THE <includeonly> SECTION HERE --->
<includeonly>
[[Category:Formatting templates{{#translation:}}]]
</includeonly>
}}
</noinclude>
5e5af5638e20e93d6f7d25d32f1e0d811b3b601f
Template:Navbox with collapsible groups
10
78
155
154
2023-12-16T19:01:26Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
{{#invoke:navbox|navbox
|name = {{{name|<noinclude>Navbox with collapsible groups</noinclude>}}}
|navbar = {{{navbar|}}}
|state = {{{state|<noinclude>uncollapsed</noinclude>}}}
|border = {{{border|{{{1|}}}}}}
|title = {{{title<includeonly>|</includeonly>}}}
|above = {{{above|}}}
|image = {{{image|}}}
|imageleft = {{{imageleft|}}}
|bodyclass = {{{bodyclass|}}}
|titleclass = {{{titleclass|}}}
|aboveclass = {{{aboveclass|}}}
|belowclass = {{{belowclass|}}}
|groupclass = {{{groupclass|}}}
|listclass = {{{listclass|}}}
|imageclass = {{{imageclass|}}}
|style = {{{style|}}}{{{bodystyle|}}}
|basestyle = {{{basestyle|}}}
|titlestyle = {{{titlestyle|}}}
|abovestyle = {{{abovestyle|}}}
|belowstyle = {{{belowstyle|}}}
|imagestyle = {{{imagestyle|}}}
|imageleftstyle = {{{imageleftstyle|}}}
|list1 =
{{#if:{{{group1<includeonly>|</includeonly>}}}{{{sect1|}}}{{{section1|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr1}}} |uncollapsed |{{{state1|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group1style|}}}{{{sect1titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list1style|}}}{{{content1style|}}}
|title = {{{group1<includeonly>|</includeonly>}}}{{{sect1|}}}{{{section1|}}}<noinclude> or {{{section1}}} or {{{sect1}}}</noinclude>
|list1 = {{{list1<includeonly>|</includeonly>}}}{{{content1|}}}<noinclude> or {{{content1}}}</noinclude>
|image = {{{image1|}}}
|imageleft = {{{imageleft1|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list1|}}}{{{content1|}}}
}}
|list2 =
{{#if:{{{group2<includeonly>|</includeonly>}}}{{{sect2|}}}{{{section2|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr2}}} |uncollapsed |{{{state2|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group2style|}}}{{{sect2titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list2style|}}}{{{content2style|}}}
|title = {{{group2<includeonly>|</includeonly>}}}{{{sect2|}}}{{{section2|}}}<noinclude> or {{{section2}}} or {{{sect2}}}</noinclude>
|list1 = {{{list2<includeonly>|</includeonly>}}}{{{content2|}}}<noinclude> or {{{content2}}}</noinclude>
|image = {{{image2|}}}
|imageleft = {{{imageleft2|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list2|}}}{{{content2|}}}
}}
|list3 =
{{#if:{{{group3<includeonly>|</includeonly>}}}{{{sect3|}}}{{{section3|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr3}}} |uncollapsed |{{{state3|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group3style|}}}{{{sect3titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list3style|}}}{{{content3style|}}}
|title = {{{group3<includeonly>|</includeonly>}}}{{{sect3|}}}{{{section3|}}}<noinclude> or {{{section3}}} or {{{sect3}}}</noinclude>
|list1 = {{{list3<includeonly>|</includeonly>}}}{{{content3|}}}<noinclude> or {{{content3}}}</noinclude>
|image = {{{image3|}}}
|imageleft = {{{imageleft3|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list3|}}}{{{content3|}}}
}}
|list4 =
{{#if:{{{group4<includeonly>|</includeonly>}}}{{{sect4|}}}{{{section4|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr4}}} |uncollapsed |{{{state4|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group4style|}}}{{{sect4titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list4style|}}}{{{content4style|}}}
|title = {{{group4<includeonly>|</includeonly>}}}{{{sect4|}}}{{{section4|}}}<noinclude> or {{{section4}}} or {{{sect4}}}</noinclude>
|list1 = {{{list4<includeonly>|</includeonly>}}}{{{content4|}}}<noinclude> or {{{content4}}}</noinclude>
|image = {{{image4|}}}
|imageleft = {{{imageleft4|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list4|}}}{{{content4|}}}
}}
|list5 =
{{#if:{{{group5<includeonly>|</includeonly>}}}{{{sect5|}}}{{{section5|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr5}}} |uncollapsed |{{{state5|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group5style|}}}{{{sect5titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list5style|}}}{{{content5style|}}}
|title = {{{group5<includeonly>|</includeonly>}}}{{{sect5|}}}{{{section5|}}}<noinclude> or {{{section5}}} or {{{sect5}}}</noinclude>
|list1 = {{{list5<includeonly>|</includeonly>}}}{{{content5|}}}<noinclude> or {{{content5}}}</noinclude>
|image = {{{image5|}}}
|imageleft = {{{imageleft5|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list5|}}}{{{content5|}}}
}}
|list6 =
{{#if:{{{group6|}}}{{{sect6|}}}{{{section6|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr6}}} |uncollapsed |{{{state6|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group6style|}}}{{{sect6titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list6style|}}}{{{content6style|}}}
|title = {{{group6|}}}{{{sect6|}}}{{{section6|}}}
|list1 = {{{list6|}}}{{{content6|}}}
|image = {{{image6|}}}
|imageleft = {{{imageleft6|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list6|}}}{{{content6|<noinclude>''(...etc, to group20/sect20/section20 and list20/content20)''</noinclude>}}}
}}
|list7 =
{{#if:{{{group7|}}}{{{sect7|}}}{{{section7|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr7}}} |uncollapsed |{{{state7|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group7style|}}}{{{sect7titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list7style|}}}{{{content7style|}}}
|title = {{{group7|}}}{{{sect7|}}}{{{section7|}}}
|list1 = {{{list7|}}}{{{content7|}}}
|image = {{{image7|}}}
|imageleft = {{{imageleft7|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list7|}}}{{{content7|}}}
}}
|list8 =
{{#if:{{{group8|}}}{{{sect8|}}}{{{section8|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr8}}} |uncollapsed |{{{state8|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group8style|}}}{{{sect8titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list8style|}}}{{{content8style|}}}
|title = {{{group8|}}}{{{sect8|}}}{{{section8|}}}
|list1 = {{{list8|}}}{{{content8|}}}
|image = {{{image8|}}}
|imageleft = {{{imageleft8|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list8|}}}{{{content8|}}}
}}
|list9 =
{{#if:{{{group9|}}}{{{sect9|}}}{{{section9|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr9}}} |uncollapsed |{{{state9|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group9style|}}}{{{sect9titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list9style|}}}{{{content9style|}}}
|title = {{{group9|}}}{{{sect9|}}}{{{section9|}}}
|list1 = {{{list9|}}}{{{content9|}}}
|image = {{{image9|}}}
|imageleft = {{{imageleft9|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list9|}}}{{{content9|}}}
}}
|list10 =
{{#if:{{{group10|}}}{{{sect10|}}}{{{section10|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr10}}} |uncollapsed |{{{state10|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group10style|}}}{{{sect10titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list10style|}}}{{{content10style|}}}
|title = {{{group10|}}}{{{sect10|}}}{{{section10|}}}
|list1 = {{{list10|}}}{{{content10|}}}
|image = {{{image10|}}}
|imageleft = {{{imageleft10|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list10|}}}{{{content10|}}}
}}
|list11 =
{{#if:{{{group11|}}}{{{sect11|}}}{{{section11|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr11}}} |uncollapsed |{{{state11|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group11style|}}}{{{sect11titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list11style|}}}{{{content11style|}}}
|title = {{{group11|}}}{{{sect11|}}}{{{section11|}}}
|list1 = {{{list11|}}}{{{content11|}}}
|image = {{{image11|}}}
|imageleft = {{{imageleft11|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list11|}}}{{{content11|}}}
}}
|list12 =
{{#if:{{{group12|}}}{{{sect12|}}}{{{section12|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr12}}} |uncollapsed |{{{state12|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group12style|}}}{{{sect12titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list12style|}}}{{{content12style|}}}
|title = {{{group12|}}}{{{sect12|}}}{{{section12|}}}
|list1 = {{{list12|}}}{{{content12|}}}
|image = {{{image12|}}}
|imageleft = {{{imageleft12|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list12|}}}{{{content12|}}}
}}
|list13 =
{{#if:{{{group13|}}}{{{sect13|}}}{{{section13|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr13}}} |uncollapsed |{{{state13|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group13style|}}}{{{sect13titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list13style|}}}{{{content13style|}}}
|title = {{{group13|}}}{{{sect13|}}}{{{section13|}}}
|list1 = {{{list13|}}}{{{content13|}}}
|image = {{{image13|}}}
|imageleft = {{{imageleft13|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list13|}}}{{{content13|}}}
}}
|list14 =
{{#if:{{{group14|}}}{{{sect14|}}}{{{section14|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr14}}} |uncollapsed |{{{state14|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group14style|}}}{{{sect14titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list14style|}}}{{{content14style|}}}
|title = {{{group14|}}}{{{sect14|}}}{{{section14|}}}
|list1 = {{{list14|}}}{{{content14|}}}
|image = {{{image14|}}}
|imageleft = {{{imageleft14|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list14|}}}{{{content14|}}}
}}
|list15 =
{{#if:{{{group15|}}}{{{sect15|}}}{{{section15|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr15}}} |uncollapsed |{{{state15|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group15style|}}}{{{sect15titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list15style|}}}{{{content15style|}}}
|title = {{{group15|}}}{{{sect15|}}}{{{section15|}}}
|list1 = {{{list15|}}}{{{content15|}}}
|image = {{{image15|}}}
|imageleft = {{{imageleft15|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list15|}}}{{{content15|}}}
}}
|list16 =
{{#if:{{{group16|}}}{{{sect16|}}}{{{section16|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr16}}} |uncollapsed |{{{state16|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group16style|}}}{{{sect16titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list16style|}}}{{{content16style|}}}
|title = {{{group16|}}}{{{sect16|}}}{{{section16|}}}
|list1 = {{{list16|}}}{{{content16|}}}
|image = {{{image16|}}}
|imageleft = {{{imageleft16|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list16|}}}{{{content16|}}}
}}
|list17 =
{{#if:{{{group17|}}}{{{sect17|}}}{{{section17|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr17}}} |uncollapsed |{{{state17|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group17style|}}}{{{sect17titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list17style|}}}{{{content17style|}}}
|title = {{{group17|}}}{{{sect17|}}}{{{section17|}}}
|list1 = {{{list17|}}}{{{content17|}}}
|image = {{{image17|}}}
|imageleft = {{{imageleft17|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list17|}}}{{{content17|}}}
}}
|list18 =
{{#if:{{{group18|}}}{{{sect18|}}}{{{section18|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr18}}} |uncollapsed |{{{state18|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group18style|}}}{{{sect18titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list18style|}}}{{{content18style|}}}
|title = {{{group18|}}}{{{sect18|}}}{{{section18|}}}
|list1 = {{{list18|}}}{{{content18|}}}
|image = {{{image18|}}}
|imageleft = {{{imageleft18|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list18|}}}{{{content18|}}}
}}
|list19 =
{{#if:{{{group19|}}}{{{sect19|}}}{{{section19|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr19}}} |uncollapsed |{{{state19|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group19style|}}}{{{sect19titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list19style|}}}{{{content19style|}}}
|title = {{{group19|}}}{{{sect19|}}}{{{section19|}}}
|list1 = {{{list19|}}}{{{content19|}}}
|image = {{{image19|}}}
|imageleft = {{{imageleft19|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list19|}}}{{{content19|}}}
}}
|list20 =
{{#if:{{{group20|}}}{{{sect20|}}}{{{section20|}}}
| {{#invoke:navbox|navbox|child
|navbar = plain
|state = {{#ifeq:{{{selected}}}|{{{abbr20}}} |uncollapsed |{{{state20|mw-collapsed}}}}}
|titlestyle = {{{basestyle|}}};{{{groupstyle|}}}{{{secttitlestyle|}}}{{{group20style|}}}{{{sect20titlestyle|}}}
|liststyle = {{{liststyle|}}}{{{contentstyle|}}}{{{list20style|}}}{{{content20style|}}}
|title = {{{group20|}}}{{{sect20|}}}{{{section20|}}}
|list1 = {{{list20|}}}{{{content20|}}}
|image = {{{image20|}}}
|imageleft = {{{imageleft20|}}}
|{{#if:{{{listpadding|}}} |listpadding |void}} = {{{listpadding|}}}
}}
| {{{list20|}}}{{{content20|}}}
}}
|below = {{{below|}}}
}}<noinclude>
{{documentation|content=
{{Lua|Module:navbox}}
}}
</noinclude>
74c4775f3e18e5a4275394f2669b82d5bddafe1a
Template:Note
10
79
157
156
2023-12-16T19:01:27Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<languages/>
<onlyinclude>{{#if: {{{1|{{{content|{{{text|{{{demo|<noinclude>demo</noinclude>}}}}}}}}}}}} | <templatestyles src="Note/styles.css" /><div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}}
|gotcha=error
|warning=warn
|notice=info
|=info
|#default={{{2|{{{type|}}}}}}
}} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{content|{{{text}}}}}}}}}</div>
| [[File:OOjs UI icon lightbulb-yellow.svg|18px|alt=<translate><!--T:1--> Note</translate>|link=]] '''<translate><!--T:2--> Note:</translate>''' }}<!--
--></onlyinclude>
{{documentation|content=
<translate>
== Usage == <!--T:3-->
</translate>
<pre>
{{Note|text=Foo}}
{{Note|type=info|text=Foo}}
{{Note|type=reminder|text=Foo}}
{{Note|type=reminder|text=Multiple<br>lines<br>of<br>text}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} <translate nowrap><!--T:6--> Loose test</translate>
* Text {{Note|inline=1|text=Foo}}
</pre>
{{Note|text=Foo}}
{{Note|type=info|text=Foo}}
{{Note|type=reminder|text=Foo}}
{{Note|type=reminder|text=Multiple<br>lines<br>of<br>text}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} <translate><!--T:4--> Loose test</translate>
* Text {{Note|inline=1|text=Foo}}
== Parameters ==
{{Note/doc}}
== See also ==
* {{tl|warn}}, shortcut for this template with <code>type=warning</code>.
* {{tl|mbox}}, and in particular the namespace-agnostic {{tl|ombox}}, which by default resembles a typical "info" template.
}}
[[Category:Templates{{#translation:}}|{{PAGENAME}}]]
9ca8639dde6299d75c337d46db3ef58bf3fb0294
Template:Tmpl
10
80
159
158
2023-12-16T19:01:27Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<onlyinclude><includeonly>{{#invoke:Tmpl|renderTmpl}}</includeonly></onlyinclude>
{{Documentation}}
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! -->
c29b0448e5b4220ef09fba833ddabdebb7b41ceb
Template:Translatable
10
81
161
160
2023-12-16T19:01:28Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<noinclude>
<languages />
</noinclude>{{#ifeq:{{pagelang|{{{1|{{FULLPAGENAME}}}}}}}|
|{{{1|{{FULLPAGENAME}}}}}
|{{#invoke:String|sub|{{{1|{{FULLPAGENAME}}}}}
|1
|{{#expr:{{#invoke:String|len|{{{1|{{FULLPAGENAME}}}}}}}-{{#invoke:String|len|{{pagelang|{{{1|{{FULLPAGENAME}}}}}}}}}-1}}
}}
}}<noinclude>
{{Documentation|content=
{{Lua|Module:String}}
<translate>
== Examples == <!--T:1-->
</translate>
* {{tlx|translatable}}
{{translatable}}
* {{tlx|translatable|2=<translate><!--T:2--> Page name</translate>}}
{{translatable|1=<translate><!--T:3--> Page name</translate>}}
* {{tlx|translatable|2=<translate><!--T:4--> Page name</translate>/{{PAGELANGUAGE}} }}
{{translatable|1=<translate><!--T:5--> Page name</translate>/{{PAGELANGUAGE}} }}
}}
[[Category:Internationalization templates{{#translation:}}]]
</noinclude>
76f8f4907f2c12144291f6adc98a40cc2cc4061f
Template:Used in system
10
82
163
162
2023-12-16T19:01:28Z
HyperNervie
2
1 revision imported: Imported from mediawiki.org
wikitext
text/x-wiki
<noinclude>
<languages />
</noinclude>{{#switch:<translate></translate>
| =
{{ombox
| type = content
| text =
'''<translate><!--T:1--> This <tvar name=1>{{lcfirst:{{NAMESPACE}}}}</tvar> is used {{<tvar name=2>#if:{{{1|}}}|{{{1}}}</tvar>|in system messages}}.</translate>'''<br/>
<translate><!--T:2--> Changes to it can cause immediate changes to the MediaWiki user interface.</translate> <!--
-->{{tmpl|0=<translate><!--T:3--> To avoid large-scale disruption, any changes should first be tested in this <tvar name=1>{{lcfirst:{{NAMESPACE}}}}</tvar>'s [[<tvar name=2>$1/sandbox</tvar>|/sandbox]] or [[<tvar name=3>$1/testcases</tvar>|/testcases]] subpage, or in your own [[<tvar name=4>Special:MyLanguage/Help:Subpages</tvar>|user space]].</translate>
|1={{#switch: {{SUBPAGENAME}}
| doc | sandbox = {{SUBJECTSPACE}}:{{BASEPAGENAME}}
| #default = {{SUBJECTPAGENAME}}
}}<!--#switch-->
}}<!--tmpl--><!--
--><translate><!--T:4--> The tested changes can then be added in one single edit to this <tvar name=1>{{lcfirst:{{NAMESPACE}}}}</tvar>.</translate> <!--
-->{{tmpl|0=<translate><!--T:5--> Please discuss any changes {{<tvar name=1>#if:{{{2|}}}</tvar>|at <tvar name=2>[[{{{2}}}]]</tvar>|on the [[<tvar name=3>$1</tvar>|talk page]]}} before implementing them.</translate>
|1={{#switch: {{SUBPAGENAME}}
| doc | sandbox = {{TALKSPACE}}:{{BASEPAGENAME}}
| #default = {{TALKPAGENAME}}
}}<!--#switch-->
}}<!--tmpl-->
}}
| #default=
{{#invoke:Template translation|renderTranslatedTemplate|template=Template:Used in system|noshift=1|uselang={{int:lang}}}}
}}<noinclude>
{{documentation}}
</noinclude>
78c2f7340eb7a3f85d04e21dbe492d6004c209f5
Template:Language suffix
10
84
165
2023-12-17T13:35:38Z
HyperNervie
2
Created page with "<includeonly>{{#switch:{{SUBPAGENAME}} |de|en|es|fr|it|ja|ko|pt|ru|zh-hans|zh-hant=/{{SUBPAGENAME}} }}</includeonly><noinclude>{{Documentation}}</noinclude>"
wikitext
text/x-wiki
<includeonly>{{#switch:{{SUBPAGENAME}}
|de|en|es|fr|it|ja|ko|pt|ru|zh-hans|zh-hant=/{{SUBPAGENAME}}
}}</includeonly><noinclude>{{Documentation}}</noinclude>
97bb7279dc47723df74bed0b9cd403f68adb200d
Template:LS
10
85
166
2023-12-17T13:36:19Z
HyperNervie
2
Redirected page to [[Template:Language suffix]]
wikitext
text/x-wiki
#redirect [[Template:Language suffix]]
2542efc1f4072c9af6c0d2509b96a14072a2b9a6
Template:Link/Component
10
86
167
2023-12-17T13:47:00Z
HyperNervie
2
Created page with "[[Component/{{{1}}}{{LS}}| {{{2| {{{1}}} }}} ]]<noinclude> {{Documentation}} </noinclude>"
wikitext
text/x-wiki
[[Component/{{{1}}}{{LS}}| {{{2| {{{1}}} }}} ]]<noinclude>
{{Documentation}}
</noinclude>
c3deb87ef5bea10d0c35c011286b542590adeb60
Template:Link/Trigger
10
87
168
2023-12-17T13:48:44Z
HyperNervie
2
Created page with "[[Component/{{{1}}}Trigger{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude> {{Documentation}} </noinclude>"
wikitext
text/x-wiki
[[Component/{{{1}}}Trigger{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude>
{{Documentation}}
</noinclude>
fa2d97b08f98424e2226a5c447b2958e9a62b8ab
Template:Link/Filter
10
88
169
2023-12-17T13:50:09Z
HyperNervie
2
Created page with "[[Component/{{{1}}}Filter{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude> {{Documentation}} </noinclude>"
wikitext
text/x-wiki
[[Component/{{{1}}}Filter{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude>
{{Documentation}}
</noinclude>
c52f2a8cee17dec5fe6f1c9628da753832a6a4fd
Template:Link/EffectDescriptor
10
89
170
2023-12-17T13:50:43Z
HyperNervie
2
Created page with "[[Component/{{{1}}}EffectDescriptor{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude> {{Documentation}} </noinclude>"
wikitext
text/x-wiki
[[Component/{{{1}}}EffectDescriptor{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude>
{{Documentation}}
</noinclude>
fc92ef95c3bdefe54128a1faa07427e1fb184b6a
Template:Link/Multiplier
10
90
171
2023-12-17T13:51:17Z
HyperNervie
2
Created page with "[[Component/{{{1}}}Multiplier{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude> {{Documentation}} </noinclude>"
wikitext
text/x-wiki
[[Component/{{{1}}}Multiplier{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude>
{{Documentation}}
</noinclude>
f7120d2c87beafdc9c0bc78d7f807c49feb4ec12
Template:Link/Condition
10
91
172
2023-12-17T13:51:56Z
HyperNervie
2
Created page with "[[Component/{{{1}}}Condition{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude> {{Documentation}} </noinclude>"
wikitext
text/x-wiki
[[Component/{{{1}}}Condition{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude>
{{Documentation}}
</noinclude>
5aeabe6a019da4a6b96ae045462e982452f62431
Template:Link/Query
10
92
173
2023-12-17T13:52:57Z
HyperNervie
2
Created page with "[[Query/{{{1}}}{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude> {{Documentation}} </noinclude>"
wikitext
text/x-wiki
[[Query/{{{1}}}{{LS}} | {{{2| {{{1}}} }}} ]]<noinclude>
{{Documentation}}
</noinclude>
4f5b4269d585a66004552d22a3a57e0b8f4e6b0b
PvZH Modding Wiki:Sandbox
4
3
174
14
2023-12-17T14:20:13Z
HyperNervie
2
Translate test
wikitext
text/x-wiki
<translate>
Fréttinga is a small municipality in MungoLand, located on the BaMungo island.
It hosts a population of about 400 people. It has some agriculture and fishing.
Tourists like to visit it in the summertime.
== Services ==
It doesn't have many services. There is a shop, and a car ferry visits the island
from the mainland once a day.
</translate>
b308beee692f73a63f9340f7fb84d4a8282171fd
Template:Components
10
54
175
113
2023-12-17T14:40:31Z
HyperNervie
2
Get ready for translation
wikitext
text/x-wiki
<noinclude><languages/>
</noinclude>{{Clear}}
{{Navbox
|name=Components
|title=[[Component{{LS}}|<translate>Components</translate>]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=[[Component{{LS}}#Card entity components|<translate>Card entity components</translate>]]
|state={{{state1|uncollapsed}}}
|group1=<translate>Basic</translate>
|list1=<!--
-->{{Link/Component|Attack}} • <!--
-->{{Link/Component|BoardAbility}} • <!--
-->{{Link/Component|Burst}} • <!--
-->{{Link/Component|Card}} • <!--
-->{{Link/Component|CreateInFront}} • <!--
-->{{Link/Component|Environment}} • <!--
-->{{Link/Component|FromBurst}} • <!--
-->{{Link/Component|Health}} • <!--
-->{{Link/Component|Plants}} • <!--
-->{{Link/Component|PrimarySuperpower}} • <!--
-->{{Link/Component|Rarity}} • <!--
-->{{Link/Component|ShowTriggeredIcon}} • <!--
-->{{Link/Component|Subtypes}} • <!--
-->{{Link/Component|SunCost}} • <!--
-->{{Link/Component|Superpower}} • <!--
-->{{Link/Component|Surprise}} • <!--
-->{{Link/Component|Tags}} • <!--
-->{{Link/Component|Unusable}} • <!--
-->{{Link/Component|Zombies}}
|group2=<translate>Ability-wise</translate>
|list2=<!--
-->{{Link/Component|Aquatic}} • <!--
-->{{Link/Component|Armor}} • <!--
-->{{Link/Component|AttackOverride}} • <!--
-->{{Link/Component|AttacksInAllLanes}} • <!--
-->{{Link/Component|AttacksOnlyInAdjacentLanes}} • <!--
-->{{Link/Component|Deadly}} • <!--
-->{{Link/Component|EffectEntitiesDescriptor}} • <!--
-->{{Link/Component|EvolutionRestriction}} • <!--
-->{{Link/Component|Evolvable}} • <!--
-->{{Link/Component|Frenzy}} • <!--
-->{{Link/Component|GrantedTriggeredAbilities}} • <!--
-->{{Link/Component|Multishot}} • <!--
-->{{Link/Component|PlaysFaceDown}} • <!--
-->{{Link/Component|SplashDamage}} • <!--
-->{{Link/Component|Springboard}} • <!--
-->{{Link/Component|Strikethrough}} • <!--
-->{{Link/Component|Teamup}} • <!--
-->{{Link/Component|Truestrike}} • <!--
-->{{Link/Component|Untrickable}}
|group3=[[Component{{LS}}#Forbidden|<translate>Forbidden</translate>]]
|list3=<!--
-->{{Link/Component|CanPlayFighterInSurprisePhase}}* • <!--
-->{{Link/Component|DamageImmunity}} • <!--
-->{{Link/Component|Evolved}} • <!--
-->{{Link/Component|FaceDown}} • <!--
-->{{Link/Component|GravestoneSpy}}* • <!--
-->{{Link/Component|MarkedForDeath}} • <!--
-->{{Link/Component|Mustache}} • <!--
-->{{Link/Component|Unhealable}}<!--
-->{{Navbox|child
|group1=<translate>Not for cards</translate>
|list1=<!--
-->{{Link/Component|GrassTerrain}} • <!--
-->{{Link/Component|Graveyard}} • <!--
-->{{Link/Component|HighgroundTerrain}} • <!--
-->{{Link/Component|Lane}} • <!--
-->{{Link/Component|Player}} • <!--
-->{{Link/Component|WaterTerrain}}
}}
|list4=<nowiki/>* <translate>Vanilla <tvar name=1>[[cards.json{{LS}}|cards.json]]</tvar> never uses these as components, but they can still be checked using <tvar name=2>{{Link/Query|HasComponent}}</tvar> and <tvar name=3>{{Link/Query|LacksComponent}}</tvar> queries.</translate>
}}
|list2={{Navbox|child
|title=[[Component{{LS}}#Effect entity components|<translate>Effect entity components</translate>]]
|state={{{state2|uncollapsed}}}
|group1=[[Component{{LS}}#Triggers|<translate>Triggers</translate>]]
|list1=<!--
-->{{Link/Trigger|Buff}} • <!--
-->{{Link/Trigger|CombatEnd}} • <!--
-->{{Link/Trigger|Damage}} • <!--
-->{{Link/Trigger|DestroyCard}} • <!--
-->{{Link/Trigger|DiscardFromPlay}} • <!--
-->{{Link/Trigger|DrawCard}} • <!--
-->{{Link/Trigger|DrawCardFromSubset}} • <!--
-->{{Link/Trigger|EnterBoard}} • <!--
-->{{Link/Trigger|ExtraAttack}} • <!--
-->{{Link/Trigger|Heal}} • <!--
-->{{Link/Trigger|LaneCombatEnd}} • <!--
-->{{Link/Trigger|LaneCombatStart}} • <!--
-->{{Link/Trigger|Move}} • <!--
-->{{Link/Trigger|Play}} • <!--
-->{{Link/Trigger|ReturnToHand}} • <!--
-->{{Link/Trigger|Reveal}} • <!--
-->{{Link/Trigger|RevealPhaseEnd}} • <!--
-->{{Link/Trigger|Slowed}} • <!--
-->{{Link/Trigger|SurprisePhaseStart}} • <!--
-->{{Link/Trigger|TurnStart}}
|group2=[[Component{{LS}}#Filters|<translate>Filters</translate>]]
|list2=<!--
-->{{Link/Filter|PrimaryTarget}} • <!--
-->{{Link/Filter|SecondaryTarget}} • <!--
-->{{Link/Filter|SelfEntity}} • <!--
-->{{Link/Filter|SelfLaneEntity}} • <!--
-->{{Link/Filter|TriggerSource}} • <!--
-->{{Link/Filter|TriggerTarget}}
|group3=[[Component{{LS}}#Effect descriptors|<translate>Effect descriptors</translate>]]
|list3=<!--
-->{{Link/EffectDescriptor|AttackInLane}} • <!--
-->{{Link/EffectDescriptor|Buff}} • <!--
-->{{Link/EffectDescriptor|ChargeBlockMeter}} • <!--
-->{{Link/EffectDescriptor|CopyCard}} • <!--
-->{{Link/EffectDescriptor|CopyStats}} • <!--
-->{{Link/EffectDescriptor|CreateCard}} • <!--
-->{{Link/EffectDescriptor|CreateCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|CreateCardInDeck}} • <!--
-->{{Link/EffectDescriptor|Damage}} • <!--
-->{{Link/EffectDescriptor|DestroyCard}} • <!--
-->{{Link/EffectDescriptor|DrawCard}} • <!--
-->{{Link/EffectDescriptor|DrawCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|ExtraAttack}} • <!--
-->{{Link/EffectDescriptor|GainSun}} • <!--
-->{{Link/EffectDescriptor|GrantAbility}} • <!--
-->{{Link/EffectDescriptor|GrantTriggeredAbility}} • <!--
-->{{Link/EffectDescriptor|Heal}} • <!--
-->{{Link/EffectDescriptor|MixedUpGravedigger}} • <!--
-->{{Link/EffectDescriptor|ModifySunCost}} • <!--
-->{{Link/EffectDescriptor|MoveCardToLanes}} • <!--
-->{{Link/EffectDescriptor|ReturnToHandFromPlay}} • <!--
-->{{Link/EffectDescriptor|SetStat}} • <!--
-->{{Link/EffectDescriptor|Slow}} • <!--
-->{{Link/EffectDescriptor|TransformIntoCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|TurnIntoGravestone}}
|group4=[[Component{{LS}}#Multipliers|<translate>Multipliers</translate>]]
|list4=<!--
-->{{Link/Multiplier|DrawnCardCost}} • <!--
-->{{Link/Multiplier|HeroHealth}} • <!--
-->{{Link/Multiplier|Query}} • <!--
-->{{Link/Multiplier|SunGained}} • <!--
-->{{Link/Multiplier|TargetAttack}} • <!--
-->{{Link/Multiplier|TargetAttackOrHealth}} • <!--
-->{{Link/Multiplier|TargetHealth}}
|group5=[[Component{{LS}}#Conditions|<translate>Conditions</translate>]]
|list5=<!--
-->{{Link/Condition|EffectValue}} • <!--
-->{{Link/Condition|OncePerGame}} • <!--
-->{{Link/Condition|OncePerTurn}} • <!--
-->{{Link/Condition|PlayerInfo}} • <!--
-->{{Link/Condition|QueryEntity}}
|group6=[[Component{{LS}}#Others|<translate>Others</translate>]]
|list6=<!--
-->{{Link/Component|ActiveTargets}} • <!--
-->{{Link/Component|Continuous}} • <!--
-->{{Link/Component|DamageEffectRedirector}} • <!--
-->{{Link/Component|DamageEffectRedirectorDescriptor}} • <!--
-->{{Link/Component|EffectEntityGrouping}} • <!--
-->{{Link/Component|EffectValueDescriptor}} • <!--
-->{{Link/Component|HeraldEntities}} • <!--
-->{{Link/Component|PersistsAfterTransform}} • <!--
-->{{Link/Component|TransformWithCreationSource}}
}}
}}<noinclude>[[Category:Navbox template{{LS}}]]</noinclude>
f5a20e7c7a1f6326f196ba20e199fb6360987054
176
175
2023-12-17T14:45:02Z
HyperNervie
2
Marked this version for translation
wikitext
text/x-wiki
<noinclude><languages/>
</noinclude>{{Clear}}
{{Navbox
|name=Components
|title=[[Component{{LS}}|<translate><!--T:1--> Components</translate>]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=[[Component{{LS}}#Card entity components|<translate><!--T:2--> Card entity components</translate>]]
|state={{{state1|uncollapsed}}}
|group1=<translate><!--T:3--> Basic</translate>
|list1=<!--
-->{{Link/Component|Attack}} • <!--
-->{{Link/Component|BoardAbility}} • <!--
-->{{Link/Component|Burst}} • <!--
-->{{Link/Component|Card}} • <!--
-->{{Link/Component|CreateInFront}} • <!--
-->{{Link/Component|Environment}} • <!--
-->{{Link/Component|FromBurst}} • <!--
-->{{Link/Component|Health}} • <!--
-->{{Link/Component|Plants}} • <!--
-->{{Link/Component|PrimarySuperpower}} • <!--
-->{{Link/Component|Rarity}} • <!--
-->{{Link/Component|ShowTriggeredIcon}} • <!--
-->{{Link/Component|Subtypes}} • <!--
-->{{Link/Component|SunCost}} • <!--
-->{{Link/Component|Superpower}} • <!--
-->{{Link/Component|Surprise}} • <!--
-->{{Link/Component|Tags}} • <!--
-->{{Link/Component|Unusable}} • <!--
-->{{Link/Component|Zombies}}
|group2=<translate><!--T:4--> Ability-wise</translate>
|list2=<!--
-->{{Link/Component|Aquatic}} • <!--
-->{{Link/Component|Armor}} • <!--
-->{{Link/Component|AttackOverride}} • <!--
-->{{Link/Component|AttacksInAllLanes}} • <!--
-->{{Link/Component|AttacksOnlyInAdjacentLanes}} • <!--
-->{{Link/Component|Deadly}} • <!--
-->{{Link/Component|EffectEntitiesDescriptor}} • <!--
-->{{Link/Component|EvolutionRestriction}} • <!--
-->{{Link/Component|Evolvable}} • <!--
-->{{Link/Component|Frenzy}} • <!--
-->{{Link/Component|GrantedTriggeredAbilities}} • <!--
-->{{Link/Component|Multishot}} • <!--
-->{{Link/Component|PlaysFaceDown}} • <!--
-->{{Link/Component|SplashDamage}} • <!--
-->{{Link/Component|Springboard}} • <!--
-->{{Link/Component|Strikethrough}} • <!--
-->{{Link/Component|Teamup}} • <!--
-->{{Link/Component|Truestrike}} • <!--
-->{{Link/Component|Untrickable}}
|group3=[[Component{{LS}}#Forbidden|<translate><!--T:5--> Forbidden</translate>]]
|list3=<!--
-->{{Link/Component|CanPlayFighterInSurprisePhase}}* • <!--
-->{{Link/Component|DamageImmunity}} • <!--
-->{{Link/Component|Evolved}} • <!--
-->{{Link/Component|FaceDown}} • <!--
-->{{Link/Component|GravestoneSpy}}* • <!--
-->{{Link/Component|MarkedForDeath}} • <!--
-->{{Link/Component|Mustache}} • <!--
-->{{Link/Component|Unhealable}}<!--
-->{{Navbox|child
|group1=<translate><!--T:6--> Not for cards</translate>
|list1=<!--
-->{{Link/Component|GrassTerrain}} • <!--
-->{{Link/Component|Graveyard}} • <!--
-->{{Link/Component|HighgroundTerrain}} • <!--
-->{{Link/Component|Lane}} • <!--
-->{{Link/Component|Player}} • <!--
-->{{Link/Component|WaterTerrain}}
}}
|list4=<nowiki/>* <translate><!--T:7--> Vanilla <tvar name=1>[[cards.json{{LS}}|cards.json]]</tvar> never uses these as components, but they can still be checked using <tvar name=2>{{Link/Query|HasComponent}}</tvar> and <tvar name=3>{{Link/Query|LacksComponent}}</tvar> queries.</translate>
}}
|list2={{Navbox|child
|title=[[Component{{LS}}#Effect entity components|<translate><!--T:8--> Effect entity components</translate>]]
|state={{{state2|uncollapsed}}}
|group1=[[Component{{LS}}#Triggers|<translate><!--T:9--> Triggers</translate>]]
|list1=<!--
-->{{Link/Trigger|Buff}} • <!--
-->{{Link/Trigger|CombatEnd}} • <!--
-->{{Link/Trigger|Damage}} • <!--
-->{{Link/Trigger|DestroyCard}} • <!--
-->{{Link/Trigger|DiscardFromPlay}} • <!--
-->{{Link/Trigger|DrawCard}} • <!--
-->{{Link/Trigger|DrawCardFromSubset}} • <!--
-->{{Link/Trigger|EnterBoard}} • <!--
-->{{Link/Trigger|ExtraAttack}} • <!--
-->{{Link/Trigger|Heal}} • <!--
-->{{Link/Trigger|LaneCombatEnd}} • <!--
-->{{Link/Trigger|LaneCombatStart}} • <!--
-->{{Link/Trigger|Move}} • <!--
-->{{Link/Trigger|Play}} • <!--
-->{{Link/Trigger|ReturnToHand}} • <!--
-->{{Link/Trigger|Reveal}} • <!--
-->{{Link/Trigger|RevealPhaseEnd}} • <!--
-->{{Link/Trigger|Slowed}} • <!--
-->{{Link/Trigger|SurprisePhaseStart}} • <!--
-->{{Link/Trigger|TurnStart}}
|group2=[[Component{{LS}}#Filters|<translate><!--T:10--> Filters</translate>]]
|list2=<!--
-->{{Link/Filter|PrimaryTarget}} • <!--
-->{{Link/Filter|SecondaryTarget}} • <!--
-->{{Link/Filter|SelfEntity}} • <!--
-->{{Link/Filter|SelfLaneEntity}} • <!--
-->{{Link/Filter|TriggerSource}} • <!--
-->{{Link/Filter|TriggerTarget}}
|group3=[[Component{{LS}}#Effect descriptors|<translate><!--T:11--> Effect descriptors</translate>]]
|list3=<!--
-->{{Link/EffectDescriptor|AttackInLane}} • <!--
-->{{Link/EffectDescriptor|Buff}} • <!--
-->{{Link/EffectDescriptor|ChargeBlockMeter}} • <!--
-->{{Link/EffectDescriptor|CopyCard}} • <!--
-->{{Link/EffectDescriptor|CopyStats}} • <!--
-->{{Link/EffectDescriptor|CreateCard}} • <!--
-->{{Link/EffectDescriptor|CreateCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|CreateCardInDeck}} • <!--
-->{{Link/EffectDescriptor|Damage}} • <!--
-->{{Link/EffectDescriptor|DestroyCard}} • <!--
-->{{Link/EffectDescriptor|DrawCard}} • <!--
-->{{Link/EffectDescriptor|DrawCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|ExtraAttack}} • <!--
-->{{Link/EffectDescriptor|GainSun}} • <!--
-->{{Link/EffectDescriptor|GrantAbility}} • <!--
-->{{Link/EffectDescriptor|GrantTriggeredAbility}} • <!--
-->{{Link/EffectDescriptor|Heal}} • <!--
-->{{Link/EffectDescriptor|MixedUpGravedigger}} • <!--
-->{{Link/EffectDescriptor|ModifySunCost}} • <!--
-->{{Link/EffectDescriptor|MoveCardToLanes}} • <!--
-->{{Link/EffectDescriptor|ReturnToHandFromPlay}} • <!--
-->{{Link/EffectDescriptor|SetStat}} • <!--
-->{{Link/EffectDescriptor|Slow}} • <!--
-->{{Link/EffectDescriptor|TransformIntoCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|TurnIntoGravestone}}
|group4=[[Component{{LS}}#Multipliers|<translate><!--T:12--> Multipliers</translate>]]
|list4=<!--
-->{{Link/Multiplier|DrawnCardCost}} • <!--
-->{{Link/Multiplier|HeroHealth}} • <!--
-->{{Link/Multiplier|Query}} • <!--
-->{{Link/Multiplier|SunGained}} • <!--
-->{{Link/Multiplier|TargetAttack}} • <!--
-->{{Link/Multiplier|TargetAttackOrHealth}} • <!--
-->{{Link/Multiplier|TargetHealth}}
|group5=[[Component{{LS}}#Conditions|<translate><!--T:13--> Conditions</translate>]]
|list5=<!--
-->{{Link/Condition|EffectValue}} • <!--
-->{{Link/Condition|OncePerGame}} • <!--
-->{{Link/Condition|OncePerTurn}} • <!--
-->{{Link/Condition|PlayerInfo}} • <!--
-->{{Link/Condition|QueryEntity}}
|group6=[[Component{{LS}}#Others|<translate><!--T:14--> Others</translate>]]
|list6=<!--
-->{{Link/Component|ActiveTargets}} • <!--
-->{{Link/Component|Continuous}} • <!--
-->{{Link/Component|DamageEffectRedirector}} • <!--
-->{{Link/Component|DamageEffectRedirectorDescriptor}} • <!--
-->{{Link/Component|EffectEntityGrouping}} • <!--
-->{{Link/Component|EffectValueDescriptor}} • <!--
-->{{Link/Component|HeraldEntities}} • <!--
-->{{Link/Component|PersistsAfterTransform}} • <!--
-->{{Link/Component|TransformWithCreationSource}}
}}
}}<noinclude>[[Category:Navbox template{{LS}}]]</noinclude>
b3473b09773d9361c451da07626cdb8e56fc7a50
Translations:Template:Components/1/en
1198
93
177
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Components
9289473eeedaee09d76c8cf1b6994d8550debf46
Translations:Template:Components/2/en
1198
94
178
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Card entity components
0d9b9171c0af2d77d0d706ad5319484b0dc4f519
Translations:Template:Components/3/en
1198
95
179
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Basic
aa2c96dacf00c451ef465f6115a45a20bccf1256
Translations:Template:Components/4/en
1198
96
180
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Ability-wise
6099af944919eed286f89bbf2c2f2d6598191107
Translations:Template:Components/5/en
1198
97
181
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Forbidden
3dab5f6012e3e149b5a939b9cebba4a0b84dc8f5
Translations:Template:Components/6/en
1198
98
182
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Not for cards
23bedb8b97f2f9644a10956211593ab2122d2935
Translations:Template:Components/7/en
1198
99
183
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Vanilla $1 never uses these as components, but they can still be checked using $2 and $3 queries.
09392ad18348a9a1d8043f8f56221621b5c478f9
Translations:Template:Components/8/en
1198
100
184
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Effect entity components
220d4d70306d06f9e2c42d8e152fbb23211f6155
Translations:Template:Components/9/en
1198
101
185
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Triggers
047708b21883d20fa96e13ada1ae6a3f040a4c1c
Translations:Template:Components/10/en
1198
102
186
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Filters
96e578211aa295317cf257310712fa28ccd8f6c6
Translations:Template:Components/11/en
1198
103
187
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Effect descriptors
0bd7501858f00e00d10647a59b750f32abf4eeda
Translations:Template:Components/12/en
1198
104
188
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Multipliers
d5b33e76dfffc702f2d448888bd2178af264d097
Translations:Template:Components/13/en
1198
105
189
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Conditions
5506eb6161a07356d96e91770d25d5a0f22200ef
Translations:Template:Components/14/en
1198
106
190
2023-12-17T14:45:33Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Others
8d7bf5bf136e81f9388c1f4eca050d6d94e965d7
Translations:Template:Components/1/zh-hans
1198
107
191
2023-12-17T14:45:54Z
HyperNervie
2
Created page with "组件"
wikitext
text/x-wiki
组件
7359f06cca8f6f53c78ad477ebf394dfd0b3ea54
Translations:Template:Components/2/zh-hans
1198
108
192
2023-12-17T14:46:04Z
HyperNervie
2
Created page with "卡牌实体组件"
wikitext
text/x-wiki
卡牌实体组件
d161292961517294a245147cba0a37c8253ac5dd
Translations:Template:Components/3/zh-hans
1198
109
193
2023-12-17T14:46:09Z
HyperNervie
2
Created page with "基础"
wikitext
text/x-wiki
基础
5f83e7f6a1ee3a10c33ee5d39314e02173de09d9
Translations:Template:Components/4/zh-hans
1198
110
194
2023-12-17T14:46:26Z
HyperNervie
2
Created page with "异能相关"
wikitext
text/x-wiki
异能相关
92c3632dd11bacee3b8430003d556e1514e3d04f
Translations:Template:Components/5/zh-hans
1198
111
195
2023-12-17T14:46:32Z
HyperNervie
2
Created page with "禁用"
wikitext
text/x-wiki
禁用
be70be5a2e125123a6a5f17119a6e03185c0dadc
Translations:Template:Components/6/zh-hans
1198
112
196
2023-12-17T14:47:11Z
HyperNervie
2
Created page with "不能给卡牌使用"
wikitext
text/x-wiki
不能给卡牌使用
5ce146a2fb778e76ca4e9b03900e0cff0ef1a4a2
Template:Components/en
10
113
197
2023-12-17T14:47:14Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<noinclude><languages/>
</noinclude>{{Clear}}
{{Navbox
|name=Components
|title=[[Component{{LS}}|Components]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=[[Component{{LS}}#Card entity components|Card entity components]]
|state={{{state1|uncollapsed}}}
|group1=Basic
|list1=<!--
-->{{Link/Component|Attack}} • <!--
-->{{Link/Component|BoardAbility}} • <!--
-->{{Link/Component|Burst}} • <!--
-->{{Link/Component|Card}} • <!--
-->{{Link/Component|CreateInFront}} • <!--
-->{{Link/Component|Environment}} • <!--
-->{{Link/Component|FromBurst}} • <!--
-->{{Link/Component|Health}} • <!--
-->{{Link/Component|Plants}} • <!--
-->{{Link/Component|PrimarySuperpower}} • <!--
-->{{Link/Component|Rarity}} • <!--
-->{{Link/Component|ShowTriggeredIcon}} • <!--
-->{{Link/Component|Subtypes}} • <!--
-->{{Link/Component|SunCost}} • <!--
-->{{Link/Component|Superpower}} • <!--
-->{{Link/Component|Surprise}} • <!--
-->{{Link/Component|Tags}} • <!--
-->{{Link/Component|Unusable}} • <!--
-->{{Link/Component|Zombies}}
|group2=Ability-wise
|list2=<!--
-->{{Link/Component|Aquatic}} • <!--
-->{{Link/Component|Armor}} • <!--
-->{{Link/Component|AttackOverride}} • <!--
-->{{Link/Component|AttacksInAllLanes}} • <!--
-->{{Link/Component|AttacksOnlyInAdjacentLanes}} • <!--
-->{{Link/Component|Deadly}} • <!--
-->{{Link/Component|EffectEntitiesDescriptor}} • <!--
-->{{Link/Component|EvolutionRestriction}} • <!--
-->{{Link/Component|Evolvable}} • <!--
-->{{Link/Component|Frenzy}} • <!--
-->{{Link/Component|GrantedTriggeredAbilities}} • <!--
-->{{Link/Component|Multishot}} • <!--
-->{{Link/Component|PlaysFaceDown}} • <!--
-->{{Link/Component|SplashDamage}} • <!--
-->{{Link/Component|Springboard}} • <!--
-->{{Link/Component|Strikethrough}} • <!--
-->{{Link/Component|Teamup}} • <!--
-->{{Link/Component|Truestrike}} • <!--
-->{{Link/Component|Untrickable}}
|group3=[[Component{{LS}}#Forbidden|Forbidden]]
|list3=<!--
-->{{Link/Component|CanPlayFighterInSurprisePhase}}* • <!--
-->{{Link/Component|DamageImmunity}} • <!--
-->{{Link/Component|Evolved}} • <!--
-->{{Link/Component|FaceDown}} • <!--
-->{{Link/Component|GravestoneSpy}}* • <!--
-->{{Link/Component|MarkedForDeath}} • <!--
-->{{Link/Component|Mustache}} • <!--
-->{{Link/Component|Unhealable}}<!--
-->{{Navbox|child
|group1=Not for cards
|list1=<!--
-->{{Link/Component|GrassTerrain}} • <!--
-->{{Link/Component|Graveyard}} • <!--
-->{{Link/Component|HighgroundTerrain}} • <!--
-->{{Link/Component|Lane}} • <!--
-->{{Link/Component|Player}} • <!--
-->{{Link/Component|WaterTerrain}}
}}
|list4=<nowiki/>* Vanilla [[cards.json{{LS}}|cards.json]] never uses these as components, but they can still be checked using {{Link/Query|HasComponent}} and {{Link/Query|LacksComponent}} queries.
}}
|list2={{Navbox|child
|title=[[Component{{LS}}#Effect entity components|Effect entity components]]
|state={{{state2|uncollapsed}}}
|group1=[[Component{{LS}}#Triggers|Triggers]]
|list1=<!--
-->{{Link/Trigger|Buff}} • <!--
-->{{Link/Trigger|CombatEnd}} • <!--
-->{{Link/Trigger|Damage}} • <!--
-->{{Link/Trigger|DestroyCard}} • <!--
-->{{Link/Trigger|DiscardFromPlay}} • <!--
-->{{Link/Trigger|DrawCard}} • <!--
-->{{Link/Trigger|DrawCardFromSubset}} • <!--
-->{{Link/Trigger|EnterBoard}} • <!--
-->{{Link/Trigger|ExtraAttack}} • <!--
-->{{Link/Trigger|Heal}} • <!--
-->{{Link/Trigger|LaneCombatEnd}} • <!--
-->{{Link/Trigger|LaneCombatStart}} • <!--
-->{{Link/Trigger|Move}} • <!--
-->{{Link/Trigger|Play}} • <!--
-->{{Link/Trigger|ReturnToHand}} • <!--
-->{{Link/Trigger|Reveal}} • <!--
-->{{Link/Trigger|RevealPhaseEnd}} • <!--
-->{{Link/Trigger|Slowed}} • <!--
-->{{Link/Trigger|SurprisePhaseStart}} • <!--
-->{{Link/Trigger|TurnStart}}
|group2=[[Component{{LS}}#Filters|Filters]]
|list2=<!--
-->{{Link/Filter|PrimaryTarget}} • <!--
-->{{Link/Filter|SecondaryTarget}} • <!--
-->{{Link/Filter|SelfEntity}} • <!--
-->{{Link/Filter|SelfLaneEntity}} • <!--
-->{{Link/Filter|TriggerSource}} • <!--
-->{{Link/Filter|TriggerTarget}}
|group3=[[Component{{LS}}#Effect descriptors|Effect descriptors]]
|list3=<!--
-->{{Link/EffectDescriptor|AttackInLane}} • <!--
-->{{Link/EffectDescriptor|Buff}} • <!--
-->{{Link/EffectDescriptor|ChargeBlockMeter}} • <!--
-->{{Link/EffectDescriptor|CopyCard}} • <!--
-->{{Link/EffectDescriptor|CopyStats}} • <!--
-->{{Link/EffectDescriptor|CreateCard}} • <!--
-->{{Link/EffectDescriptor|CreateCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|CreateCardInDeck}} • <!--
-->{{Link/EffectDescriptor|Damage}} • <!--
-->{{Link/EffectDescriptor|DestroyCard}} • <!--
-->{{Link/EffectDescriptor|DrawCard}} • <!--
-->{{Link/EffectDescriptor|DrawCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|ExtraAttack}} • <!--
-->{{Link/EffectDescriptor|GainSun}} • <!--
-->{{Link/EffectDescriptor|GrantAbility}} • <!--
-->{{Link/EffectDescriptor|GrantTriggeredAbility}} • <!--
-->{{Link/EffectDescriptor|Heal}} • <!--
-->{{Link/EffectDescriptor|MixedUpGravedigger}} • <!--
-->{{Link/EffectDescriptor|ModifySunCost}} • <!--
-->{{Link/EffectDescriptor|MoveCardToLanes}} • <!--
-->{{Link/EffectDescriptor|ReturnToHandFromPlay}} • <!--
-->{{Link/EffectDescriptor|SetStat}} • <!--
-->{{Link/EffectDescriptor|Slow}} • <!--
-->{{Link/EffectDescriptor|TransformIntoCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|TurnIntoGravestone}}
|group4=[[Component{{LS}}#Multipliers|Multipliers]]
|list4=<!--
-->{{Link/Multiplier|DrawnCardCost}} • <!--
-->{{Link/Multiplier|HeroHealth}} • <!--
-->{{Link/Multiplier|Query}} • <!--
-->{{Link/Multiplier|SunGained}} • <!--
-->{{Link/Multiplier|TargetAttack}} • <!--
-->{{Link/Multiplier|TargetAttackOrHealth}} • <!--
-->{{Link/Multiplier|TargetHealth}}
|group5=[[Component{{LS}}#Conditions|Conditions]]
|list5=<!--
-->{{Link/Condition|EffectValue}} • <!--
-->{{Link/Condition|OncePerGame}} • <!--
-->{{Link/Condition|OncePerTurn}} • <!--
-->{{Link/Condition|PlayerInfo}} • <!--
-->{{Link/Condition|QueryEntity}}
|group6=[[Component{{LS}}#Others|Others]]
|list6=<!--
-->{{Link/Component|ActiveTargets}} • <!--
-->{{Link/Component|Continuous}} • <!--
-->{{Link/Component|DamageEffectRedirector}} • <!--
-->{{Link/Component|DamageEffectRedirectorDescriptor}} • <!--
-->{{Link/Component|EffectEntityGrouping}} • <!--
-->{{Link/Component|EffectValueDescriptor}} • <!--
-->{{Link/Component|HeraldEntities}} • <!--
-->{{Link/Component|PersistsAfterTransform}} • <!--
-->{{Link/Component|TransformWithCreationSource}}
}}
}}<noinclude>[[Category:Navbox template{{LS}}]]</noinclude>
0e9fbd6f27cb7c76fb86f14ecf1176dbde16f8f4
Template:Components/zh-hans
10
114
198
2023-12-17T14:47:16Z
HyperNervie
2
Created page with "组件"
wikitext
text/x-wiki
<noinclude><languages/>
</noinclude>{{Clear}}
{{Navbox
|name=Components
|title=[[Component{{LS}}|组件]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=[[Component{{LS}}#Card entity components|卡牌实体组件]]
|state={{{state1|uncollapsed}}}
|group1=基础
|list1=<!--
-->{{Link/Component|Attack}} • <!--
-->{{Link/Component|BoardAbility}} • <!--
-->{{Link/Component|Burst}} • <!--
-->{{Link/Component|Card}} • <!--
-->{{Link/Component|CreateInFront}} • <!--
-->{{Link/Component|Environment}} • <!--
-->{{Link/Component|FromBurst}} • <!--
-->{{Link/Component|Health}} • <!--
-->{{Link/Component|Plants}} • <!--
-->{{Link/Component|PrimarySuperpower}} • <!--
-->{{Link/Component|Rarity}} • <!--
-->{{Link/Component|ShowTriggeredIcon}} • <!--
-->{{Link/Component|Subtypes}} • <!--
-->{{Link/Component|SunCost}} • <!--
-->{{Link/Component|Superpower}} • <!--
-->{{Link/Component|Surprise}} • <!--
-->{{Link/Component|Tags}} • <!--
-->{{Link/Component|Unusable}} • <!--
-->{{Link/Component|Zombies}}
|group2=异能相关
|list2=<!--
-->{{Link/Component|Aquatic}} • <!--
-->{{Link/Component|Armor}} • <!--
-->{{Link/Component|AttackOverride}} • <!--
-->{{Link/Component|AttacksInAllLanes}} • <!--
-->{{Link/Component|AttacksOnlyInAdjacentLanes}} • <!--
-->{{Link/Component|Deadly}} • <!--
-->{{Link/Component|EffectEntitiesDescriptor}} • <!--
-->{{Link/Component|EvolutionRestriction}} • <!--
-->{{Link/Component|Evolvable}} • <!--
-->{{Link/Component|Frenzy}} • <!--
-->{{Link/Component|GrantedTriggeredAbilities}} • <!--
-->{{Link/Component|Multishot}} • <!--
-->{{Link/Component|PlaysFaceDown}} • <!--
-->{{Link/Component|SplashDamage}} • <!--
-->{{Link/Component|Springboard}} • <!--
-->{{Link/Component|Strikethrough}} • <!--
-->{{Link/Component|Teamup}} • <!--
-->{{Link/Component|Truestrike}} • <!--
-->{{Link/Component|Untrickable}}
|group3=[[Component{{LS}}#Forbidden|禁用]]
|list3=<!--
-->{{Link/Component|CanPlayFighterInSurprisePhase}}* • <!--
-->{{Link/Component|DamageImmunity}} • <!--
-->{{Link/Component|Evolved}} • <!--
-->{{Link/Component|FaceDown}} • <!--
-->{{Link/Component|GravestoneSpy}}* • <!--
-->{{Link/Component|MarkedForDeath}} • <!--
-->{{Link/Component|Mustache}} • <!--
-->{{Link/Component|Unhealable}}<!--
-->{{Navbox|child
|group1=不能给卡牌使用
|list1=<!--
-->{{Link/Component|GrassTerrain}} • <!--
-->{{Link/Component|Graveyard}} • <!--
-->{{Link/Component|HighgroundTerrain}} • <!--
-->{{Link/Component|Lane}} • <!--
-->{{Link/Component|Player}} • <!--
-->{{Link/Component|WaterTerrain}}
}}
|list4=<nowiki/>* <span lang="en" dir="ltr" class="mw-content-ltr">Vanilla [[cards.json{{LS}}|cards.json]] never uses these as components, but they can still be checked using {{Link/Query|HasComponent}} and {{Link/Query|LacksComponent}} queries.</span>
}}
|list2={{Navbox|child
|title=[[Component{{LS}}#Effect entity components|<span lang="en" dir="ltr" class="mw-content-ltr">Effect entity components</span>]]
|state={{{state2|uncollapsed}}}
|group1=[[Component{{LS}}#Triggers|<span lang="en" dir="ltr" class="mw-content-ltr">Triggers</span>]]
|list1=<!--
-->{{Link/Trigger|Buff}} • <!--
-->{{Link/Trigger|CombatEnd}} • <!--
-->{{Link/Trigger|Damage}} • <!--
-->{{Link/Trigger|DestroyCard}} • <!--
-->{{Link/Trigger|DiscardFromPlay}} • <!--
-->{{Link/Trigger|DrawCard}} • <!--
-->{{Link/Trigger|DrawCardFromSubset}} • <!--
-->{{Link/Trigger|EnterBoard}} • <!--
-->{{Link/Trigger|ExtraAttack}} • <!--
-->{{Link/Trigger|Heal}} • <!--
-->{{Link/Trigger|LaneCombatEnd}} • <!--
-->{{Link/Trigger|LaneCombatStart}} • <!--
-->{{Link/Trigger|Move}} • <!--
-->{{Link/Trigger|Play}} • <!--
-->{{Link/Trigger|ReturnToHand}} • <!--
-->{{Link/Trigger|Reveal}} • <!--
-->{{Link/Trigger|RevealPhaseEnd}} • <!--
-->{{Link/Trigger|Slowed}} • <!--
-->{{Link/Trigger|SurprisePhaseStart}} • <!--
-->{{Link/Trigger|TurnStart}}
|group2=[[Component{{LS}}#Filters|<span lang="en" dir="ltr" class="mw-content-ltr">Filters</span>]]
|list2=<!--
-->{{Link/Filter|PrimaryTarget}} • <!--
-->{{Link/Filter|SecondaryTarget}} • <!--
-->{{Link/Filter|SelfEntity}} • <!--
-->{{Link/Filter|SelfLaneEntity}} • <!--
-->{{Link/Filter|TriggerSource}} • <!--
-->{{Link/Filter|TriggerTarget}}
|group3=[[Component{{LS}}#Effect descriptors|<span lang="en" dir="ltr" class="mw-content-ltr">Effect descriptors</span>]]
|list3=<!--
-->{{Link/EffectDescriptor|AttackInLane}} • <!--
-->{{Link/EffectDescriptor|Buff}} • <!--
-->{{Link/EffectDescriptor|ChargeBlockMeter}} • <!--
-->{{Link/EffectDescriptor|CopyCard}} • <!--
-->{{Link/EffectDescriptor|CopyStats}} • <!--
-->{{Link/EffectDescriptor|CreateCard}} • <!--
-->{{Link/EffectDescriptor|CreateCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|CreateCardInDeck}} • <!--
-->{{Link/EffectDescriptor|Damage}} • <!--
-->{{Link/EffectDescriptor|DestroyCard}} • <!--
-->{{Link/EffectDescriptor|DrawCard}} • <!--
-->{{Link/EffectDescriptor|DrawCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|ExtraAttack}} • <!--
-->{{Link/EffectDescriptor|GainSun}} • <!--
-->{{Link/EffectDescriptor|GrantAbility}} • <!--
-->{{Link/EffectDescriptor|GrantTriggeredAbility}} • <!--
-->{{Link/EffectDescriptor|Heal}} • <!--
-->{{Link/EffectDescriptor|MixedUpGravedigger}} • <!--
-->{{Link/EffectDescriptor|ModifySunCost}} • <!--
-->{{Link/EffectDescriptor|MoveCardToLanes}} • <!--
-->{{Link/EffectDescriptor|ReturnToHandFromPlay}} • <!--
-->{{Link/EffectDescriptor|SetStat}} • <!--
-->{{Link/EffectDescriptor|Slow}} • <!--
-->{{Link/EffectDescriptor|TransformIntoCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|TurnIntoGravestone}}
|group4=[[Component{{LS}}#Multipliers|<span lang="en" dir="ltr" class="mw-content-ltr">Multipliers</span>]]
|list4=<!--
-->{{Link/Multiplier|DrawnCardCost}} • <!--
-->{{Link/Multiplier|HeroHealth}} • <!--
-->{{Link/Multiplier|Query}} • <!--
-->{{Link/Multiplier|SunGained}} • <!--
-->{{Link/Multiplier|TargetAttack}} • <!--
-->{{Link/Multiplier|TargetAttackOrHealth}} • <!--
-->{{Link/Multiplier|TargetHealth}}
|group5=[[Component{{LS}}#Conditions|<span lang="en" dir="ltr" class="mw-content-ltr">Conditions</span>]]
|list5=<!--
-->{{Link/Condition|EffectValue}} • <!--
-->{{Link/Condition|OncePerGame}} • <!--
-->{{Link/Condition|OncePerTurn}} • <!--
-->{{Link/Condition|PlayerInfo}} • <!--
-->{{Link/Condition|QueryEntity}}
|group6=[[Component{{LS}}#Others|<span lang="en" dir="ltr" class="mw-content-ltr">Others</span>]]
|list6=<!--
-->{{Link/Component|ActiveTargets}} • <!--
-->{{Link/Component|Continuous}} • <!--
-->{{Link/Component|DamageEffectRedirector}} • <!--
-->{{Link/Component|DamageEffectRedirectorDescriptor}} • <!--
-->{{Link/Component|EffectEntityGrouping}} • <!--
-->{{Link/Component|EffectValueDescriptor}} • <!--
-->{{Link/Component|HeraldEntities}} • <!--
-->{{Link/Component|PersistsAfterTransform}} • <!--
-->{{Link/Component|TransformWithCreationSource}}
}}
}}<noinclude>[[Category:Navbox template{{LS}}]]</noinclude>
61f160ec648666aa38d31fdf3370a6c7258c4829
Translations:Template:Components/7/zh-hans
1198
115
199
2023-12-17T14:49:30Z
HyperNervie
2
Created page with "原版$1中,这些组件从未以组件的形式提及,但仍可以用$2和$3问询来检查。"
wikitext
text/x-wiki
原版$1中,这些组件从未以组件的形式提及,但仍可以用$2和$3问询来检查。
946a0167bf4fdb955608f2f037e86cd69f987f46
Translations:Template:Components/8/zh-hans
1198
116
200
2023-12-17T14:49:53Z
HyperNervie
2
Created page with "效果实体组件"
wikitext
text/x-wiki
效果实体组件
dcd00d46b78fe0df787dfbf9ce81b9ccc3e47562
Translations:Template:Components/9/zh-hans
1198
117
201
2023-12-17T14:49:55Z
HyperNervie
2
Created page with "触发器"
wikitext
text/x-wiki
触发器
2d189a3f46a337024ca86c15e815acc9c59da5c2
Translations:Template:Components/10/zh-hans
1198
118
202
2023-12-17T14:50:02Z
HyperNervie
2
Created page with "过滤器"
wikitext
text/x-wiki
过滤器
cc81fff5894d1afe2aafd565ac757a7cf9510913
Translations:Template:Components/11/zh-hans
1198
119
203
2023-12-17T14:50:08Z
HyperNervie
2
Created page with "效果描述器"
wikitext
text/x-wiki
效果描述器
7a3362a0cbca4ce164140d94be651577348cfa0c
Translations:Template:Components/13/zh-hans
1198
120
204
2023-12-17T14:51:01Z
HyperNervie
2
Created page with "条件"
wikitext
text/x-wiki
条件
72f1cf759c9bbec57dd3ffad345b1163f5d3b5f7
Translations:Template:Components/12/zh-hans
1198
121
205
2023-12-17T14:51:01Z
HyperNervie
2
Created page with "倍增器"
wikitext
text/x-wiki
倍增器
c41d024442c6493455309e37d82b444caf65be0b
Translations:Template:Components/14/zh-hans
1198
122
206
2023-12-17T14:51:05Z
HyperNervie
2
Created page with "其它"
wikitext
text/x-wiki
其它
295c71ff9869bf06adfa91a41a5f75d5826bef7c
Template:Components/zh-hans
10
114
207
198
2023-12-17T14:53:55Z
HyperNervie
2
Created page with "原版$1中,这些组件从未以组件的形式提及,但仍可以用$2和$3问询来检查。"
wikitext
text/x-wiki
<noinclude><languages/>
</noinclude>{{Clear}}
{{Navbox
|name=Components
|title=[[Component{{LS}}|组件]]
|state={{{state|uncollapsed}}}
|list1={{Navbox|child
|title=[[Component{{LS}}#Card entity components|卡牌实体组件]]
|state={{{state1|uncollapsed}}}
|group1=基础
|list1=<!--
-->{{Link/Component|Attack}} • <!--
-->{{Link/Component|BoardAbility}} • <!--
-->{{Link/Component|Burst}} • <!--
-->{{Link/Component|Card}} • <!--
-->{{Link/Component|CreateInFront}} • <!--
-->{{Link/Component|Environment}} • <!--
-->{{Link/Component|FromBurst}} • <!--
-->{{Link/Component|Health}} • <!--
-->{{Link/Component|Plants}} • <!--
-->{{Link/Component|PrimarySuperpower}} • <!--
-->{{Link/Component|Rarity}} • <!--
-->{{Link/Component|ShowTriggeredIcon}} • <!--
-->{{Link/Component|Subtypes}} • <!--
-->{{Link/Component|SunCost}} • <!--
-->{{Link/Component|Superpower}} • <!--
-->{{Link/Component|Surprise}} • <!--
-->{{Link/Component|Tags}} • <!--
-->{{Link/Component|Unusable}} • <!--
-->{{Link/Component|Zombies}}
|group2=异能相关
|list2=<!--
-->{{Link/Component|Aquatic}} • <!--
-->{{Link/Component|Armor}} • <!--
-->{{Link/Component|AttackOverride}} • <!--
-->{{Link/Component|AttacksInAllLanes}} • <!--
-->{{Link/Component|AttacksOnlyInAdjacentLanes}} • <!--
-->{{Link/Component|Deadly}} • <!--
-->{{Link/Component|EffectEntitiesDescriptor}} • <!--
-->{{Link/Component|EvolutionRestriction}} • <!--
-->{{Link/Component|Evolvable}} • <!--
-->{{Link/Component|Frenzy}} • <!--
-->{{Link/Component|GrantedTriggeredAbilities}} • <!--
-->{{Link/Component|Multishot}} • <!--
-->{{Link/Component|PlaysFaceDown}} • <!--
-->{{Link/Component|SplashDamage}} • <!--
-->{{Link/Component|Springboard}} • <!--
-->{{Link/Component|Strikethrough}} • <!--
-->{{Link/Component|Teamup}} • <!--
-->{{Link/Component|Truestrike}} • <!--
-->{{Link/Component|Untrickable}}
|group3=[[Component{{LS}}#Forbidden|禁用]]
|list3=<!--
-->{{Link/Component|CanPlayFighterInSurprisePhase}}* • <!--
-->{{Link/Component|DamageImmunity}} • <!--
-->{{Link/Component|Evolved}} • <!--
-->{{Link/Component|FaceDown}} • <!--
-->{{Link/Component|GravestoneSpy}}* • <!--
-->{{Link/Component|MarkedForDeath}} • <!--
-->{{Link/Component|Mustache}} • <!--
-->{{Link/Component|Unhealable}}<!--
-->{{Navbox|child
|group1=不能给卡牌使用
|list1=<!--
-->{{Link/Component|GrassTerrain}} • <!--
-->{{Link/Component|Graveyard}} • <!--
-->{{Link/Component|HighgroundTerrain}} • <!--
-->{{Link/Component|Lane}} • <!--
-->{{Link/Component|Player}} • <!--
-->{{Link/Component|WaterTerrain}}
}}
|list4=<nowiki/>* 原版[[cards.json{{LS}}|cards.json]]中,这些组件从未以组件的形式提及,但仍可以用{{Link/Query|HasComponent}}和{{Link/Query|LacksComponent}}问询来检查。
}}
|list2={{Navbox|child
|title=[[Component{{LS}}#Effect entity components|效果实体组件]]
|state={{{state2|uncollapsed}}}
|group1=[[Component{{LS}}#Triggers|触发器]]
|list1=<!--
-->{{Link/Trigger|Buff}} • <!--
-->{{Link/Trigger|CombatEnd}} • <!--
-->{{Link/Trigger|Damage}} • <!--
-->{{Link/Trigger|DestroyCard}} • <!--
-->{{Link/Trigger|DiscardFromPlay}} • <!--
-->{{Link/Trigger|DrawCard}} • <!--
-->{{Link/Trigger|DrawCardFromSubset}} • <!--
-->{{Link/Trigger|EnterBoard}} • <!--
-->{{Link/Trigger|ExtraAttack}} • <!--
-->{{Link/Trigger|Heal}} • <!--
-->{{Link/Trigger|LaneCombatEnd}} • <!--
-->{{Link/Trigger|LaneCombatStart}} • <!--
-->{{Link/Trigger|Move}} • <!--
-->{{Link/Trigger|Play}} • <!--
-->{{Link/Trigger|ReturnToHand}} • <!--
-->{{Link/Trigger|Reveal}} • <!--
-->{{Link/Trigger|RevealPhaseEnd}} • <!--
-->{{Link/Trigger|Slowed}} • <!--
-->{{Link/Trigger|SurprisePhaseStart}} • <!--
-->{{Link/Trigger|TurnStart}}
|group2=[[Component{{LS}}#Filters|过滤器]]
|list2=<!--
-->{{Link/Filter|PrimaryTarget}} • <!--
-->{{Link/Filter|SecondaryTarget}} • <!--
-->{{Link/Filter|SelfEntity}} • <!--
-->{{Link/Filter|SelfLaneEntity}} • <!--
-->{{Link/Filter|TriggerSource}} • <!--
-->{{Link/Filter|TriggerTarget}}
|group3=[[Component{{LS}}#Effect descriptors|效果描述器]]
|list3=<!--
-->{{Link/EffectDescriptor|AttackInLane}} • <!--
-->{{Link/EffectDescriptor|Buff}} • <!--
-->{{Link/EffectDescriptor|ChargeBlockMeter}} • <!--
-->{{Link/EffectDescriptor|CopyCard}} • <!--
-->{{Link/EffectDescriptor|CopyStats}} • <!--
-->{{Link/EffectDescriptor|CreateCard}} • <!--
-->{{Link/EffectDescriptor|CreateCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|CreateCardInDeck}} • <!--
-->{{Link/EffectDescriptor|Damage}} • <!--
-->{{Link/EffectDescriptor|DestroyCard}} • <!--
-->{{Link/EffectDescriptor|DrawCard}} • <!--
-->{{Link/EffectDescriptor|DrawCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|ExtraAttack}} • <!--
-->{{Link/EffectDescriptor|GainSun}} • <!--
-->{{Link/EffectDescriptor|GrantAbility}} • <!--
-->{{Link/EffectDescriptor|GrantTriggeredAbility}} • <!--
-->{{Link/EffectDescriptor|Heal}} • <!--
-->{{Link/EffectDescriptor|MixedUpGravedigger}} • <!--
-->{{Link/EffectDescriptor|ModifySunCost}} • <!--
-->{{Link/EffectDescriptor|MoveCardToLanes}} • <!--
-->{{Link/EffectDescriptor|ReturnToHandFromPlay}} • <!--
-->{{Link/EffectDescriptor|SetStat}} • <!--
-->{{Link/EffectDescriptor|Slow}} • <!--
-->{{Link/EffectDescriptor|TransformIntoCardFromSubset}} • <!--
-->{{Link/EffectDescriptor|TurnIntoGravestone}}
|group4=[[Component{{LS}}#Multipliers|倍增器]]
|list4=<!--
-->{{Link/Multiplier|DrawnCardCost}} • <!--
-->{{Link/Multiplier|HeroHealth}} • <!--
-->{{Link/Multiplier|Query}} • <!--
-->{{Link/Multiplier|SunGained}} • <!--
-->{{Link/Multiplier|TargetAttack}} • <!--
-->{{Link/Multiplier|TargetAttackOrHealth}} • <!--
-->{{Link/Multiplier|TargetHealth}}
|group5=[[Component{{LS}}#Conditions|条件]]
|list5=<!--
-->{{Link/Condition|EffectValue}} • <!--
-->{{Link/Condition|OncePerGame}} • <!--
-->{{Link/Condition|OncePerTurn}} • <!--
-->{{Link/Condition|PlayerInfo}} • <!--
-->{{Link/Condition|QueryEntity}}
|group6=[[Component{{LS}}#Others|其它]]
|list6=<!--
-->{{Link/Component|ActiveTargets}} • <!--
-->{{Link/Component|Continuous}} • <!--
-->{{Link/Component|DamageEffectRedirector}} • <!--
-->{{Link/Component|DamageEffectRedirectorDescriptor}} • <!--
-->{{Link/Component|EffectEntityGrouping}} • <!--
-->{{Link/Component|EffectValueDescriptor}} • <!--
-->{{Link/Component|HeraldEntities}} • <!--
-->{{Link/Component|PersistsAfterTransform}} • <!--
-->{{Link/Component|TransformWithCreationSource}}
}}
}}<noinclude>[[Category:Navbox template{{LS}}]]</noinclude>
9704ef7e4ca2f09003dc253e39ed3996ae56dea3
Template:JSON structure
10
123
208
2023-12-17T16:30:18Z
HyperNervie
2
Created page with "<includeonly><tabber> |-|<translate>Treeview</translate>= <div class="treeview"> {{#if: {{{component|}}} |* <code class="key object"></code><translate>The <tvar name=1><code class="key">$data</code></tvar> object of the component.</translate> }}{{#if: {{{query|}}} |* <code class="key object"></code><translate>The <tvar name=1><code class="key">$data</code></tvar> object of the query.</translate> }}{{{1}}} </div> |-|<translate>Source</translate>= {{#tag:syntaxhighlight| {..."
wikitext
text/x-wiki
<includeonly><tabber>
|-|<translate>Treeview</translate>=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code><translate>The <tvar name=1><code class="key">$data</code></tvar> object of the component.</translate>
}}{{#if: {{{query|}}} |* <code class="key object"></code><translate>The <tvar name=1><code class="key">$data</code></tvar> object of the query.</translate>
}}{{{1}}}
</div>
|-|<translate>Source</translate>=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | Components.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
e6dc6f3e694da497e8abfff60a8530f17429f1c9
209
208
2023-12-17T16:32:28Z
HyperNervie
2
Marked this version for translation
wikitext
text/x-wiki
<includeonly><tabber>
|-|<translate><!--T:1--> Treeview</translate>=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code><translate><!--T:2--> The <tvar name=1><code class="key">$data</code></tvar> object of the component.</translate>
}}{{#if: {{{query|}}} |* <code class="key object"></code><translate><!--T:3--> The <tvar name=1><code class="key">$data</code></tvar> object of the query.</translate>
}}{{{1}}}
</div>
|-|<translate><!--T:4--> Source</translate>=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | Components.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
256fe27fdcc8358461c3d2a127fba524c043baf1
Translations:Template:JSON structure/1/zh-hans
1198
124
210
2023-12-17T16:33:34Z
HyperNervie
2
Created page with "树形图"
wikitext
text/x-wiki
树形图
2627e5e44a6d40936f3844681b38c8124cb30df1
Translations:Template:JSON structure/2/zh-hans
1198
125
211
2023-12-17T16:33:52Z
HyperNervie
2
Created page with "组件的$1对象。"
wikitext
text/x-wiki
组件的$1对象。
12bf57ddd9b50ba6a7929c7db06ec91b47fd42d1
Translations:Template:JSON structure/3/zh-hans
1198
126
212
2023-12-17T16:34:10Z
HyperNervie
2
Created page with "问询的$1对象。"
wikitext
text/x-wiki
问询的$1对象。
a2b9174455b76a77f5fd257caf66b5e8b922dd66
Translations:Template:JSON structure/4/zh-hans
1198
127
213
2023-12-17T16:34:28Z
HyperNervie
2
Created page with "源代码"
wikitext
text/x-wiki
源代码
740296d924a3cd2448c9806e652d188808156b5a
Template:JSON structure/zh-hans
10
128
214
2023-12-17T16:34:50Z
HyperNervie
2
Created page with "树形图"
wikitext
text/x-wiki
<includeonly><tabber>
|-|树形图=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code>组件的<code class="key">$data</code>对象。
}}{{#if: {{{query|}}} |* <code class="key object"></code>问询的<code class="key">$data</code>对象。
}}{{{1}}}
</div>
|-|源代码=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | Components.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
e624fd4e4d5c9440a0c7eb1ad20d08f69766f8fd
Translations:Template:JSON structure/1/en
1198
129
215
2023-12-17T16:38:44Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Treeview
d78dca84fb22f51e97d39c20a021d39026e0b47d
Translations:Template:JSON structure/2/en
1198
130
216
2023-12-17T16:38:44Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
The $1 object of the component.
fbd68a7a8e09a68693e6941b872fdc90e5ee6665
Translations:Template:JSON structure/3/en
1198
131
217
2023-12-17T16:38:44Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
The $1 object of the query.
13dc64e91949dc587004f437170062b49cf1eea5
Translations:Template:JSON structure/4/en
1198
132
218
2023-12-17T16:38:45Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Source
6da13addb000b67d42a6d66391713819e634149f
Template:JSON structure/en
10
133
219
2023-12-17T16:43:18Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<includeonly><tabber>
|-|Treeview=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code>The <code class="key">$data</code> object of the component.
}}{{#if: {{{query|}}} |* <code class="key object"></code>The <code class="key">$data</code> object of the query.
}}{{{1}}}
</div>
|-|Source=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | Components.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
41cdfacec43e2e5b8c39b3e0954d2a0708aeeda7
Module:Message
828
134
220
2023-12-18T08:46:39Z
HyperNervie
2
Created page with "local p = {} function p.call(frame) local args = frame:getParent().args local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}") local availableLangs = { ["de"] = true, ["en"] = true, ["es"] = true, ["fr"] = true, ["it"] = true, ["ja"] = true, ["ko"] = true, ["pt"] = true, ["ru"] = true, ["zh-hans"] = true, ["zh-hant"] = true } if not availableLangs[lang] then lang = "en" end local templateTitle = "Message/" .. args[1] .. "/" ....."
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { name = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
function p.getMsg(frame)
local args = frame:getParent().args
local message = frame.args[args.name]
for i, v in ipairs(args) do
message = string.gsub(message, '%$' .. i, v)
end
return frame:preprocess(message)
end
return p
a178d4541b03969e4525bf2704690bcbac5c95ec
221
220
2023-12-18T09:15:35Z
HyperNervie
2
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { key = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
function p.getMsg(frame)
local args = frame:getParent().args
if args.key == nil then
error("Message key is not given.")
end
local message = frame.args[args.key]
local subpage = frame.args.subpage
if message == nil then
if subpage then
error(string.format("Message key doesn't match any one in [[Template:Message/%s]].", subpage))
else
error("Message key doesn't match any one in the subpage of [[Template:Message]].")
end
end
for i, v in ipairs(args) do
message = string.gsub(message, '%$' .. i, v)
end
return frame:preprocess(message)
end
return p
25cfbb005a9d475f1d3b50d50faa12a42c4342ac
224
221
2023-12-18T10:14:08Z
HyperNervie
2
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { key = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
function p.getMsg(frame)
local args = frame:getParent().args
if args.key == nil then
error("Message key is not given.")
end
local message = frame.args[args.key]
local subpage = frame.args[1]
if message == nil then
message = string.format("⧼[[Template:Message/%s|%s]]⧽", subpage, args.key)
end
for i, v in ipairs(args) do
message = string.gsub(message, '%$' .. i, v)
end
return frame:preprocess(message)
end
function p.msgTable(frame)
local result = '{|class="wikitable"\n|-\n!Key!!Value\n'
for k, v in pairs(frame.args) do
if type(k) == "string" then
result = result .. string.gsub('|-\n|%s\n|%s\n', k, v)
end
end
result = result .. "|}"
return result
end
return p
2e409147d9f121916c0eee4b4066e92c76f82cdd
225
224
2023-12-18T10:32:05Z
HyperNervie
2
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { key = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
function p.getMsg(frame)
local args = frame:getParent().args
if args.showTable then
return getMsgTable(frame.args)
end
if args.key == nil then
error("Message key is not given.")
end
local message = frame.args[args.key]
local subpage = frame.args[1]
if message == nil then
message = string.format("⧼[[Template:Message/%s|template-message-%s]]⧽", subpage, args.key)
end
for i, v in ipairs(args) do
message = string.gsub(message, '%$' .. i, v)
end
return frame:preprocess(message)
end
local function showMsgTable(msgTable)
local result = '{|class="wikitable"\n|-\n!Key!!Value\n'
for k, v in pairs(msgTable) do
if type(k) == "string" then
result = result .. string.gsub('|-\n|%s\n|%s\n', k, v)
end
end
result = result .. "|}"
return result
end
return p
893930d67b2c117a0e5194e8241583479b33325f
226
225
2023-12-18T10:34:56Z
HyperNervie
2
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { key = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
local function showMsgTable(msgTable)
local result = '{|class="wikitable"\n|-\n!Key!!Value\n'
for k, v in pairs(msgTable) do
if type(k) == "string" then
result = result .. string.gsub('|-\n|%s\n|%s\n', k, v)
end
end
result = result .. "|}"
return result
end
function p.getMsg(frame)
local args = frame:getParent().args
if args.showTable then
return getMsgTable(frame.args)
end
if args.key == nil then
error("Message key is not given.")
end
local message = frame.args[args.key]
local subpage = frame.args[1]
if message == nil then
message = string.format("⧼[[Template:Message/%s|template-message-%s]]⧽", subpage, args.key)
end
for i, v in ipairs(args) do
message = string.gsub(message, '%$' .. i, v)
end
return frame:preprocess(message)
end
return p
892478baffc4119266ee68bdb82f1ef5915faa44
227
226
2023-12-18T10:35:47Z
HyperNervie
2
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { key = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
local function showMsgTable(msgTable)
local result = '{|class="wikitable"\n|-\n!Key!!Value\n'
for k, v in pairs(msgTable) do
if type(k) == "string" then
result = result .. string.gsub('|-\n|%s\n|%s\n', k, v)
end
end
result = result .. "|}"
return result
end
function p.getMsg(frame)
local args = frame:getParent().args
if args.showTable then
return showMsgTable(frame.args)
end
if args.key == nil then
error("Message key is not given.")
end
local message = frame.args[args.key]
local subpage = frame.args[1]
if message == nil then
message = string.format("⧼[[Template:Message/%s|template-message-%s]]⧽", subpage, args.key)
end
for i, v in ipairs(args) do
message = string.gsub(message, '%$' .. i, v)
end
return frame:preprocess(message)
end
return p
55b9408f936abd5f1738d432ccc983400b585a6c
228
227
2023-12-18T10:37:09Z
HyperNervie
2
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { key = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
local function showMsgTable(msgTable)
local result = '{|class="wikitable"\n|-\n!Key!!Value\n'
for k, v in pairs(msgTable) do
if type(k) == "string" then
result = result .. string.format('|-\n|%s\n|%s\n', k, v)
end
end
result = result .. "|}"
return result
end
function p.getMsg(frame)
local args = frame:getParent().args
if args.showTable then
return showMsgTable(frame.args)
end
if args.key == nil then
error("Message key is not given.")
end
local message = frame.args[args.key]
local subpage = frame.args[1]
if message == nil then
message = string.format("⧼[[Template:Message/%s|template-message-%s]]⧽", subpage, args.key)
end
for i, v in ipairs(args) do
message = string.gsub(message, '%$' .. i, v)
end
return frame:preprocess(message)
end
return p
c8ecba875e545eb6f9b66ee02e1458f51ef88ebb
245
228
2023-12-18T13:28:26Z
HyperNervie
2
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { key = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
local function showMsgTable(msgTable)
local result = '{|class="wikitable"\n|-\n!Key!!Value\n'
for k, v in pairs(msgTable) do
if type(k) == "string" then
result = result .. string.format('|-\n|%s\n|%s\n', k, v)
end
end
result = result .. "|}"
return result
end
function p.getMsg(frame)
local args = frame:getParent().args
if args.showTable then
return showMsgTable(frame.args)
end
if args.key == nil then
error("Message key is not given.")
end
local message = frame.args[args.key]
local subpage = frame.args[1]
if message == nil then
message = string.format("⧼[[Template:Message/%s|template-message-%s]]⧽", subpage, args.key)
end
for i, v in ipairs(args) do
message = string.gsub(message, '{' .. i .. '}', v)
end
return frame:preprocess(message)
end
return p
c71e31b88b2e9fbb925d2b6a5ed64f9575975cab
247
245
2023-12-19T15:42:56Z
HyperNervie
2
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { key = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
local function showMsgTable(msgTable)
local result = '{|class="wikitable sortable"\n|-\n!Key!!Value\n'
for k, v in pairs(msgTable) do
if type(k) == "string" then
result = result .. string.format('|-\n|%s\n|%s\n', k, v)
end
end
result = result .. "|}"
return result
end
function p.getMsg(frame)
local args = frame:getParent().args
if args.showTable then
return showMsgTable(frame.args)
end
if args.key == nil then
error("Message key is not given.")
end
local message = frame.args[args.key]
local subpage = frame.args[1]
if message == nil then
message = string.format("⧼[[Template:Message/%s|template-message-%s]]⧽", subpage, args.key)
end
for i, v in ipairs(args) do
message = string.gsub(message, '{' .. i .. '}', v)
end
return frame:preprocess(message)
end
return p
894c504c3cb8e85e89f5d1bcd4908a0c3681854a
Template:Message
10
135
222
2023-12-18T09:18:10Z
HyperNervie
2
Created page with "<includeonly>{{#invoke:Message|call}}</includeonly><noinclude>{{Documentation}}</noinclude>"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|call}}</includeonly><noinclude>{{Documentation}}</noinclude>
f90e37cbc73baf5a66590f70ea2f487ece1c7201
Template:Message/section title
10
136
223
2023-12-18T09:30:36Z
HyperNervie
2
Created page with "<includeonly>{{#invoke:getMsg|subpage=section title |details=<translate>Details</translate> |json-structure=<translate>JSON structure</translate> |navigation=<translate>Navigation</translate> |see-also=<translate>See also</translate> }}</includeonly><noinclude> {{Documentation|content={{#tag:pre|{{msgnw:{{PAGENAME}} }} }} }} </noinclude>"
wikitext
text/x-wiki
<includeonly>{{#invoke:getMsg|subpage=section title
|details=<translate>Details</translate>
|json-structure=<translate>JSON structure</translate>
|navigation=<translate>Navigation</translate>
|see-also=<translate>See also</translate>
}}</includeonly><noinclude>
{{Documentation|content={{#tag:pre|{{msgnw:{{PAGENAME}} }} }} }}
</noinclude>
8577862901cee950f5e5a3e684a8c018297929ad
229
223
2023-12-18T10:37:52Z
HyperNervie
2
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=<translate>Details</translate>
|json-structure=<translate>JSON structure</translate>
|navigation=<translate>Navigation</translate>
|see-also=<translate>See also</translate>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
18908bd23de3e56c9522a4c814928f30c6d2827e
230
229
2023-12-18T10:39:24Z
HyperNervie
2
Marked this version for translation
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=<translate><!--T:1--> Details</translate>
|json-structure=<translate><!--T:2--> JSON structure</translate>
|navigation=<translate><!--T:3--> Navigation</translate>
|see-also=<translate><!--T:4--> See also</translate>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
17b7089763103251c1c114b3994ef49f0ace1d63
Translations:Template:Message/section title/1/en
1198
137
231
2023-12-18T10:39:26Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Details
dc3decbb93847518f1a049dcf49d0d7c6560bcc6
Translations:Template:Message/section title/2/en
1198
138
232
2023-12-18T10:39:26Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
JSON structure
6bddec897b145829711eba4b7171b7ced6d5ab13
Translations:Template:Message/section title/3/en
1198
139
233
2023-12-18T10:39:27Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Navigation
cf03cf2e9cdf95a20af09137dfb9071db0c31bf2
Translations:Template:Message/section title/4/en
1198
140
234
2023-12-18T10:39:27Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
See also
2d8243a2c0e464492c9d563c4f92c56ae3421bcc
Template:Message/section title/en
10
141
235
2023-12-18T10:39:32Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=Details
|json-structure=JSON structure
|navigation=Navigation
|see-also=See also
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
9f124cb8f0896c6ac390ed793909e4fde429d38e
Translations:Template:Message/section title/1/zh-hans
1198
142
236
2023-12-18T10:45:51Z
HyperNervie
2
Created page with "细节"
wikitext
text/x-wiki
细节
70ecfa4b711b2f55061ae73e5e453a725c2e7c2f
Template:Message/section title/zh-hans
10
143
237
2023-12-18T10:45:59Z
HyperNervie
2
Created page with "细节"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=细节
|json-structure=<span lang="en" dir="ltr" class="mw-content-ltr">JSON structure</span>
|navigation=<span lang="en" dir="ltr" class="mw-content-ltr">Navigation</span>
|see-also=<span lang="en" dir="ltr" class="mw-content-ltr">See also</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
d5ad3466fea7cc43a0c939b922869250338b14ac
239
237
2023-12-18T10:46:05Z
HyperNervie
2
Created page with "JSON结构"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=细节
|json-structure=JSON结构
|navigation=<span lang="en" dir="ltr" class="mw-content-ltr">Navigation</span>
|see-also=<span lang="en" dir="ltr" class="mw-content-ltr">See also</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
1d1b911e280b31633dcf3577cee5604135755523
241
239
2023-12-18T10:46:13Z
HyperNervie
2
Created page with "导航"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=细节
|json-structure=JSON结构
|navigation=导航
|see-also=<span lang="en" dir="ltr" class="mw-content-ltr">See also</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
19459883a22cd333a0d97d591cdc0b90cd8ce796
243
241
2023-12-18T10:46:18Z
HyperNervie
2
Created page with "另见"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=细节
|json-structure=JSON结构
|navigation=导航
|see-also=另见
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
1ede6ba32e631ae373ab7747908fa89c72d163d3
Translations:Template:Message/section title/2/zh-hans
1198
144
238
2023-12-18T10:46:01Z
HyperNervie
2
Created page with "JSON结构"
wikitext
text/x-wiki
JSON结构
8aa4786ab0ea03d44041c6563ccdf93b74567e13
Translations:Template:Message/section title/3/zh-hans
1198
145
240
2023-12-18T10:46:08Z
HyperNervie
2
Created page with "导航"
wikitext
text/x-wiki
导航
c7ed24950426e2d71e02f902e4bd3ef5548ff0d1
Translations:Template:Message/section title/4/zh-hans
1198
146
242
2023-12-18T10:46:14Z
HyperNervie
2
Created page with "另见"
wikitext
text/x-wiki
另见
230f3d61c6247c54666ed7e8f654ddf8827446b2
MediaWiki:Edittools
8
2
244
2
2023-12-18T12:57:34Z
HyperNervie
2
wikitext
text/x-wiki
<div id="mw-edittools-charinsert" class="mw-charinsert-buttons" title="Click on the wanted special character.">
<p class="mw-edittools-section" data-section-title="Standard">
'''General:'''
<charinsert label="\t">	</charinsert> •
<charinsert><nowiki><!-- + --></nowiki></charinsert> •
<charinsert><code class="key">+</code></charinsert> •
<charinsert><nowiki>+</nowiki></charinsert> •
<charinsert><includeonly>+</includeonly></charinsert> •
<charinsert><noinclude>+</noinclude></charinsert>
<br>
'''Translations:'''
<charinsert><languages/></charinsert> •
<charinsert><translate>+</translate></charinsert> •
<charinsert><tvar name=>+</tvar></charinsert> •
<charinsert>/<nowiki>{{</nowiki>PAGELANGUAGE}}</charinsert>
</p>
</div>
450f6ecd6a1cf669b5888eeaf723072df1e5a8fe
Template:Message/keyword
10
148
248
2023-12-19T15:50:40Z
HyperNervie
2
Created page with "<includeonly>{{#invoke:Message|getMsg|1=section title |ambush=<translate>Anti-Hero</translate> |ambush-x=<translate>Anti-Hero {1}</translate> |aquatic=<translate>Amphibious</translate> |armored=<translate>Armored</translate> |armored-x=<translate>Armored {1}</translate> |attackoverride=<translate>Health-Attack</translate> |bounce=<translate>Bounce</translate> |conjure=<translate>Conjure</translate> |conjures=<translate>Conjures</translate> |deadly=<translate>Deadly</tran..."
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=<translate>Anti-Hero</translate>
|ambush-x=<translate>Anti-Hero {1}</translate>
|aquatic=<translate>Amphibious</translate>
|armored=<translate>Armored</translate>
|armored-x=<translate>Armored {1}</translate>
|attackoverride=<translate>Health-Attack</translate>
|bounce=<translate>Bounce</translate>
|conjure=<translate>Conjure</translate>
|conjures=<translate>Conjures</translate>
|deadly=<translate>Deadly</translate>
|dinoroar=<translate>Dino-Roar</translate>
|doublestrike=<translate>Double Strike</translate>
|evolution=<translate>Evolution</translate>
|evolution-x=<translate>{1} Evolution</translate>
|freeze=<translate>Freeze</translate>
|frenzy=<translate>Frenzy</translate>
|gravestone=<translate>Gravestone</translate>
|hunt=<translate>Hunt</translate>
|overshoot=<translate>Overshoot</translate>
|overshoot-x=<translate>Overshoot {1}</translate>
|shielded=<translate>Shielded</translate>
|splashdamage=<translate>Splash Damage</translate>
|splashdamage-x=<translate>Splash Damage {1}</translate>
|springboard=<translate>Fusion</translate>
|strikethrough=<translate>Strikethrough</translate>
|teamup=<translate>Team-Up</translate>
|truestrike=<translate>Bullseye</translate>
|untrickable=<translate>Untrickable</translate>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
e7d333252dc3ee5db00e0ddcfaa96eb8c2cd44a1
249
248
2023-12-19T15:51:52Z
HyperNervie
2
Marked this version for translation
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=<translate><!--T:1--> Anti-Hero</translate>
|ambush-x=<translate><!--T:2--> Anti-Hero {1}</translate>
|aquatic=<translate><!--T:3--> Amphibious</translate>
|armored=<translate><!--T:4--> Armored</translate>
|armored-x=<translate><!--T:5--> Armored {1}</translate>
|attackoverride=<translate><!--T:6--> Health-Attack</translate>
|bounce=<translate><!--T:7--> Bounce</translate>
|conjure=<translate><!--T:8--> Conjure</translate>
|conjures=<translate><!--T:9--> Conjures</translate>
|deadly=<translate><!--T:10--> Deadly</translate>
|dinoroar=<translate><!--T:11--> Dino-Roar</translate>
|doublestrike=<translate><!--T:12--> Double Strike</translate>
|evolution=<translate><!--T:13--> Evolution</translate>
|evolution-x=<translate><!--T:14--> {1} Evolution</translate>
|freeze=<translate><!--T:15--> Freeze</translate>
|frenzy=<translate><!--T:16--> Frenzy</translate>
|gravestone=<translate><!--T:17--> Gravestone</translate>
|hunt=<translate><!--T:18--> Hunt</translate>
|overshoot=<translate><!--T:19--> Overshoot</translate>
|overshoot-x=<translate><!--T:20--> Overshoot {1}</translate>
|shielded=<translate><!--T:21--> Shielded</translate>
|splashdamage=<translate><!--T:22--> Splash Damage</translate>
|splashdamage-x=<translate><!--T:23--> Splash Damage {1}</translate>
|springboard=<translate><!--T:24--> Fusion</translate>
|strikethrough=<translate><!--T:25--> Strikethrough</translate>
|teamup=<translate><!--T:26--> Team-Up</translate>
|truestrike=<translate><!--T:27--> Bullseye</translate>
|untrickable=<translate><!--T:28--> Untrickable</translate>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
8f2b318c4b8aaf9a6b975a035ee49f3a2def920c
Translations:Template:Message/keyword/1/en
1198
149
250
2023-12-19T15:52:15Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Anti-Hero
290ba93ebdafa80ecee0b8e2f3eb7ffa6d37696a
Translations:Template:Message/keyword/2/en
1198
150
251
2023-12-19T15:52:15Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Anti-Hero {1}
26f41bc993b544bf417ddcb7e19796827be69f9f
Translations:Template:Message/keyword/3/en
1198
151
252
2023-12-19T15:52:15Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Amphibious
f51017aefc1e39c05f08d904f1ff2047d6b81209
Translations:Template:Message/keyword/4/en
1198
152
253
2023-12-19T15:52:15Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Armored
2999320c2d5e5908e238a231313068b55da7f397
Translations:Template:Message/keyword/5/en
1198
153
254
2023-12-19T15:52:15Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Armored {1}
fee7469371a314f36a9ab8ad8f89904b5429fbc2
Translations:Template:Message/keyword/6/en
1198
154
255
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Health-Attack
d3dccdcdb873e1c6244bdda35bed421f9b178ab0
Translations:Template:Message/keyword/7/en
1198
155
256
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Bounce
af7ed27586b5893f5b467417832893d5863bd3cd
Translations:Template:Message/keyword/8/en
1198
156
257
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Conjure
6ccab6900cf05d2450946c922c9ea16b78a75f18
Translations:Template:Message/keyword/9/en
1198
157
258
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Conjures
ec20099c4712343c566c6ed6b726b83621482f37
Translations:Template:Message/keyword/10/en
1198
158
259
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Deadly
1f0803bb019a60e05232b822f3dde4b862af5dbe
Translations:Template:Message/keyword/11/en
1198
159
260
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Dino-Roar
6a0d3378c802cd8c81b796a2bafbdb12573daa9b
Translations:Template:Message/keyword/12/en
1198
160
261
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Double Strike
797c28176a35929156e0f6df7ff79ac39b41c763
Translations:Template:Message/keyword/13/en
1198
161
262
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Evolution
f760e16023bf894abde8086e9d7f6c930e923eae
Translations:Template:Message/keyword/14/en
1198
162
263
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
{1} Evolution
679486745f02149fff835c21407a857b247717c7
Translations:Template:Message/keyword/15/en
1198
163
264
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Freeze
5a6b2d30fea65c18adb9b90c467fa827dbba5c4b
Translations:Template:Message/keyword/16/en
1198
164
265
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Frenzy
c095734e905ee2ed0d9d1f3fd2e25d34138c38b9
Translations:Template:Message/keyword/17/en
1198
165
266
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Gravestone
a6916aacc0629bb21e723fd9fbe02f171eca09d7
Translations:Template:Message/keyword/18/en
1198
166
267
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Hunt
063772891d8288e94b1f48b3a8472af54eb320a4
Translations:Template:Message/keyword/19/en
1198
167
268
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Overshoot
3754f768f9f269de9d1c10c866b63744b3cd7cd3
Translations:Template:Message/keyword/20/en
1198
168
269
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Overshoot {1}
67554038bb6a5d3e15b3f2cda9b9df8777fc8302
Translations:Template:Message/keyword/21/en
1198
169
270
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Shielded
acf842b71c6dc8ac23837a7d08dd1be2d83d3c3e
Translations:Template:Message/keyword/22/en
1198
170
271
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Splash Damage
e6c8111db5dccfdfea16bf8189fa403981cd3354
Translations:Template:Message/keyword/23/en
1198
171
272
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Splash Damage {1}
cc909be19c48d468d8287505b9f0149e93ea0f3a
Translations:Template:Message/keyword/24/en
1198
172
273
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Fusion
cdf2e5fcd33e60c149dbaeb7315f4ef9de629849
Translations:Template:Message/keyword/25/en
1198
173
274
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Strikethrough
a93b9a6808a95ca93515164188159659017155cb
Translations:Template:Message/keyword/26/en
1198
174
275
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Team-Up
7e39ada7fc6cccb78e4843160687218f0893bc66
Translations:Template:Message/keyword/27/en
1198
175
276
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Bullseye
ffb3a635db82436b5aade99cffc92370f3f7ed19
Translations:Template:Message/keyword/28/en
1198
176
277
2023-12-19T15:52:16Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Untrickable
1f59a211045b3272803eab7e350cb0950bfc831a
Template:Message/keyword/en
10
177
278
2023-12-19T15:52:42Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=Anti-Hero
|ambush-x=Anti-Hero {1}
|aquatic=Amphibious
|armored=Armored
|armored-x=Armored {1}
|attackoverride=Health-Attack
|bounce=Bounce
|conjure=Conjure
|conjures=Conjures
|deadly=Deadly
|dinoroar=Dino-Roar
|doublestrike=Double Strike
|evolution=Evolution
|evolution-x={1} Evolution
|freeze=Freeze
|frenzy=Frenzy
|gravestone=Gravestone
|hunt=Hunt
|overshoot=Overshoot
|overshoot-x=Overshoot {1}
|shielded=Shielded
|splashdamage=Splash Damage
|splashdamage-x=Splash Damage {1}
|springboard=Fusion
|strikethrough=Strikethrough
|teamup=Team-Up
|truestrike=Bullseye
|untrickable=Untrickable
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
0269cc783fc5a024e67605cda9496a24b310b975
Translations:Template:Message/keyword/1/zh-hans
1198
178
279
2023-12-19T15:52:56Z
HyperNervie
2
Created page with "克制英雄"
wikitext
text/x-wiki
克制英雄
8922f7697d4b75e2cce8f7ec2888a75c357c21a2
Template:Message/keyword/zh-hans
10
179
280
2023-12-19T15:53:04Z
HyperNervie
2
Created page with "克制英雄"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=<span lang="en" dir="ltr" class="mw-content-ltr">Anti-Hero {1}</span>
|aquatic=<span lang="en" dir="ltr" class="mw-content-ltr">Amphibious</span>
|armored=<span lang="en" dir="ltr" class="mw-content-ltr">Armored</span>
|armored-x=<span lang="en" dir="ltr" class="mw-content-ltr">Armored {1}</span>
|attackoverride=<span lang="en" dir="ltr" class="mw-content-ltr">Health-Attack</span>
|bounce=<span lang="en" dir="ltr" class="mw-content-ltr">Bounce</span>
|conjure=<span lang="en" dir="ltr" class="mw-content-ltr">Conjure</span>
|conjures=<span lang="en" dir="ltr" class="mw-content-ltr">Conjures</span>
|deadly=<span lang="en" dir="ltr" class="mw-content-ltr">Deadly</span>
|dinoroar=<span lang="en" dir="ltr" class="mw-content-ltr">Dino-Roar</span>
|doublestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Double Strike</span>
|evolution=<span lang="en" dir="ltr" class="mw-content-ltr">Evolution</span>
|evolution-x=<span lang="en" dir="ltr" class="mw-content-ltr">{1} Evolution</span>
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
2899a5cf61f8343f6d4169786533e7f8dc744b00
283
280
2023-12-19T15:53:16Z
HyperNervie
2
Created page with "克制英雄{1}"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=<span lang="en" dir="ltr" class="mw-content-ltr">Armored</span>
|armored-x=<span lang="en" dir="ltr" class="mw-content-ltr">Armored {1}</span>
|attackoverride=<span lang="en" dir="ltr" class="mw-content-ltr">Health-Attack</span>
|bounce=<span lang="en" dir="ltr" class="mw-content-ltr">Bounce</span>
|conjure=<span lang="en" dir="ltr" class="mw-content-ltr">Conjure</span>
|conjures=<span lang="en" dir="ltr" class="mw-content-ltr">Conjures</span>
|deadly=<span lang="en" dir="ltr" class="mw-content-ltr">Deadly</span>
|dinoroar=<span lang="en" dir="ltr" class="mw-content-ltr">Dino-Roar</span>
|doublestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Double Strike</span>
|evolution=<span lang="en" dir="ltr" class="mw-content-ltr">Evolution</span>
|evolution-x=<span lang="en" dir="ltr" class="mw-content-ltr">{1} Evolution</span>
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
e68e78ca4e676924fc7c309ebf47513722a1c48b
286
283
2023-12-19T15:54:15Z
HyperNervie
2
Created page with "装甲"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=<span lang="en" dir="ltr" class="mw-content-ltr">Health-Attack</span>
|bounce=<span lang="en" dir="ltr" class="mw-content-ltr">Bounce</span>
|conjure=<span lang="en" dir="ltr" class="mw-content-ltr">Conjure</span>
|conjures=<span lang="en" dir="ltr" class="mw-content-ltr">Conjures</span>
|deadly=<span lang="en" dir="ltr" class="mw-content-ltr">Deadly</span>
|dinoroar=<span lang="en" dir="ltr" class="mw-content-ltr">Dino-Roar</span>
|doublestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Double Strike</span>
|evolution=<span lang="en" dir="ltr" class="mw-content-ltr">Evolution</span>
|evolution-x=<span lang="en" dir="ltr" class="mw-content-ltr">{1} Evolution</span>
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
dcc4262b215086433014a1b1203a7013dc2782d8
289
286
2023-12-19T15:56:50Z
HyperNervie
2
Created page with "命攻"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=<span lang="en" dir="ltr" class="mw-content-ltr">Bounce</span>
|conjure=<span lang="en" dir="ltr" class="mw-content-ltr">Conjure</span>
|conjures=<span lang="en" dir="ltr" class="mw-content-ltr">Conjures</span>
|deadly=<span lang="en" dir="ltr" class="mw-content-ltr">Deadly</span>
|dinoroar=<span lang="en" dir="ltr" class="mw-content-ltr">Dino-Roar</span>
|doublestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Double Strike</span>
|evolution=<span lang="en" dir="ltr" class="mw-content-ltr">Evolution</span>
|evolution-x=<span lang="en" dir="ltr" class="mw-content-ltr">{1} Evolution</span>
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
45e62ab3ccdf2211f36ddfe6b5c4e86e81af4fc9
292
289
2023-12-19T15:57:24Z
HyperNervie
2
Created page with "弹射"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=<span lang="en" dir="ltr" class="mw-content-ltr">Conjures</span>
|deadly=<span lang="en" dir="ltr" class="mw-content-ltr">Deadly</span>
|dinoroar=<span lang="en" dir="ltr" class="mw-content-ltr">Dino-Roar</span>
|doublestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Double Strike</span>
|evolution=<span lang="en" dir="ltr" class="mw-content-ltr">Evolution</span>
|evolution-x=<span lang="en" dir="ltr" class="mw-content-ltr">{1} Evolution</span>
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
c34a2cb399eda13c0d7f5f35d22336c6604dedcf
294
292
2023-12-19T15:57:35Z
HyperNervie
2
Created page with "召唤"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=<span lang="en" dir="ltr" class="mw-content-ltr">Deadly</span>
|dinoroar=<span lang="en" dir="ltr" class="mw-content-ltr">Dino-Roar</span>
|doublestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Double Strike</span>
|evolution=<span lang="en" dir="ltr" class="mw-content-ltr">Evolution</span>
|evolution-x=<span lang="en" dir="ltr" class="mw-content-ltr">{1} Evolution</span>
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
bf1d74ab4bf519a47013da3cd7bb164fb6d9a42e
297
294
2023-12-19T15:57:50Z
HyperNervie
2
Created page with "致命"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Double Strike</span>
|evolution=<span lang="en" dir="ltr" class="mw-content-ltr">Evolution</span>
|evolution-x=<span lang="en" dir="ltr" class="mw-content-ltr">{1} Evolution</span>
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
42d21d1254f27f4857512bbeb36e2892f335fb63
299
297
2023-12-19T15:57:59Z
HyperNervie
2
Created page with "双重打击"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=<span lang="en" dir="ltr" class="mw-content-ltr">Evolution</span>
|evolution-x=<span lang="en" dir="ltr" class="mw-content-ltr">{1} Evolution</span>
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
22b6da43b7af1c4a9549326fbc0d51297ed7493a
301
299
2023-12-19T15:58:12Z
HyperNervie
2
Created page with "进化"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x=<span lang="en" dir="ltr" class="mw-content-ltr">{1} Evolution</span>
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
cb70119f5dd501e4a3a0cf5e6b6f204605b52cec
Translations:Template:Message/keyword/2/zh-hans
1198
180
281
2023-12-19T15:53:08Z
HyperNervie
2
Created page with "克制英雄{1}"
wikitext
text/x-wiki
克制英雄{1}
1fe2d961484df11a3f8fc05f0936c76824319594
Translations:Template:Message/keyword/3/zh-hans
1198
181
282
2023-12-19T15:53:14Z
HyperNervie
2
Created page with "两栖"
wikitext
text/x-wiki
两栖
8618e98625a56658b336a85e50c9e1e60a09d53a
Translations:Template:Message/keyword/4/zh-hans
1198
182
284
2023-12-19T15:54:00Z
HyperNervie
2
Created page with "装甲"
wikitext
text/x-wiki
装甲
f913b1c1928e5c1ec233597ec7e7f58c2fcf2d59
Translations:Template:Message/keyword/5/zh-hans
1198
183
285
2023-12-19T15:54:07Z
HyperNervie
2
Created page with "装甲{1}"
wikitext
text/x-wiki
装甲{1}
519016b6c5e2a8253385817353ab119fc0f00884
Translations:Template:Message/keyword/6/qqq
1198
184
287
2023-12-19T15:56:26Z
HyperNervie
2
Created page with "This is a conjectural trait name for "attack using health"."
wikitext
text/x-wiki
This is a conjectural trait name for "attack using health".
da2b2c85525462f4d9b97b73c0fb6d6217db5b4a
Translations:Template:Message/keyword/6/zh-hans
1198
185
288
2023-12-19T15:56:43Z
HyperNervie
2
Created page with "命攻"
wikitext
text/x-wiki
命攻
2073d669bd5cfaa23297a8fd3d36ed558338e869
Translations:Template:Message/keyword/7/zh-hans
1198
186
290
2023-12-19T15:57:17Z
HyperNervie
2
Created page with "弹射"
wikitext
text/x-wiki
弹射
d579ae80c4c08edee29059769756c8953264430a
Translations:Template:Message/keyword/8/zh-hans
1198
187
291
2023-12-19T15:57:23Z
HyperNervie
2
Created page with "召唤"
wikitext
text/x-wiki
召唤
bf5e0242befcf33afa8ed433d55e6b31d7293325
Translations:Template:Message/keyword/9/zh-hans
1198
188
293
2023-12-19T15:57:28Z
HyperNervie
2
Created page with "召唤"
wikitext
text/x-wiki
召唤
bf5e0242befcf33afa8ed433d55e6b31d7293325
Translations:Template:Message/keyword/10/zh-hans
1198
189
295
2023-12-19T15:57:41Z
HyperNervie
2
Created page with "致命"
wikitext
text/x-wiki
致命
6d715a9fa13120ea5bb71ad944c973312ce2a5d9
Translations:Template:Message/keyword/11/zh-hans
1198
190
296
2023-12-19T15:57:46Z
HyperNervie
2
Created page with "龙吼"
wikitext
text/x-wiki
龙吼
713feb9cf07417eea0185ce5175d3d32353a002f
Translations:Template:Message/keyword/12/zh-hans
1198
191
298
2023-12-19T15:57:54Z
HyperNervie
2
Created page with "双重打击"
wikitext
text/x-wiki
双重打击
5ab09ce619bc8bf0056b14e4fa12c0084862bd13
Translations:Template:Message/keyword/13/zh-hans
1198
192
300
2023-12-19T15:58:07Z
HyperNervie
2
Created page with "进化"
wikitext
text/x-wiki
进化
76f457a78df12293f938f2c79d61a7a5be6700e4
Translations:Template:Message/keyword/14/zh-hans
1198
193
302
2023-12-19T15:58:15Z
HyperNervie
2
Created page with "{1}进化"
wikitext
text/x-wiki
{1}进化
0cabbc872e43c604e42418b23e24c2a3e81a05a5
Template:Message/keyword/zh-hans
10
179
303
301
2023-12-19T15:58:24Z
HyperNervie
2
Created page with "{1}进化"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=<span lang="en" dir="ltr" class="mw-content-ltr">Freeze</span>
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
463a1c9775adaf4ad5274e0a6ecff86a91f62c5e
305
303
2023-12-19T15:58:33Z
HyperNervie
2
Created page with "冻结"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=<span lang="en" dir="ltr" class="mw-content-ltr">Frenzy</span>
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
e3bff7fb30162c9f41db5468b802c3f874f46f41
308
305
2023-12-19T15:58:42Z
HyperNervie
2
Created page with "狂热"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=狂热
|gravestone=<span lang="en" dir="ltr" class="mw-content-ltr">Gravestone</span>
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
669933e1c48d7f62e4b6ede29b01465a1461b477
309
308
2023-12-19T15:58:44Z
HyperNervie
2
Created page with "墓碑"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=狂热
|gravestone=墓碑
|hunt=<span lang="en" dir="ltr" class="mw-content-ltr">Hunt</span>
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
a621917993863ba41820cb413ea55558a141c141
311
309
2023-12-19T15:58:58Z
HyperNervie
2
Created page with "捕猎"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=狂热
|gravestone=墓碑
|hunt=捕猎
|overshoot=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot</span>
|overshoot-x=<span lang="en" dir="ltr" class="mw-content-ltr">Overshoot {1}</span>
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
4224ebecf8f373c8ecf2cc96a44739b085d06afe
314
311
2023-12-19T15:59:08Z
HyperNervie
2
Created page with "先攻"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=狂热
|gravestone=墓碑
|hunt=捕猎
|overshoot=先攻
|overshoot-x=先攻{1}
|shielded=<span lang="en" dir="ltr" class="mw-content-ltr">Shielded</span>
|splashdamage=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage</span>
|splashdamage-x=<span lang="en" dir="ltr" class="mw-content-ltr">Splash Damage {1}</span>
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
efe65d4acbe72ad6c0ff6e56cb3db84a1cb44c7e
319
314
2023-12-19T16:11:09Z
HyperNervie
2
Created page with "溅射伤害"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=狂热
|gravestone=墓碑
|hunt=捕猎
|overshoot=先攻
|overshoot-x=先攻{1}
|shielded=保护
|splashdamage=溅射伤害
|splashdamage-x=溅射伤害{1}
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=<span lang="en" dir="ltr" class="mw-content-ltr">Strikethrough</span>
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
957d8513b8ea1b20e55346668c8ae6b7ab7c7e11
322
319
2023-12-19T16:11:12Z
HyperNervie
2
Created page with "溅射伤害{1}"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=狂热
|gravestone=墓碑
|hunt=捕猎
|overshoot=先攻
|overshoot-x=先攻{1}
|shielded=保护
|splashdamage=溅射伤害
|splashdamage-x=溅射伤害{1}
|springboard=<span lang="en" dir="ltr" class="mw-content-ltr">Fusion</span>
|strikethrough=穿透
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
93ae7abf0cb932cef944708f63831c465526f809
323
322
2023-12-19T16:11:13Z
HyperNervie
2
Created page with "穿透"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=狂热
|gravestone=墓碑
|hunt=捕猎
|overshoot=先攻
|overshoot-x=先攻{1}
|shielded=保护
|splashdamage=溅射伤害
|splashdamage-x=溅射伤害{1}
|springboard=融合
|strikethrough=穿透
|teamup=<span lang="en" dir="ltr" class="mw-content-ltr">Team-Up</span>
|truestrike=<span lang="en" dir="ltr" class="mw-content-ltr">Bullseye</span>
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
027613a64c4c7c1b7cd9d810d349a9f6e8633aa9
326
323
2023-12-19T16:11:22Z
HyperNervie
2
Created page with "组队"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=狂热
|gravestone=墓碑
|hunt=捕猎
|overshoot=先攻
|overshoot-x=先攻{1}
|shielded=保护
|splashdamage=溅射伤害
|splashdamage-x=溅射伤害{1}
|springboard=融合
|strikethrough=穿透
|teamup=组队
|truestrike=必中
|untrickable=<span lang="en" dir="ltr" class="mw-content-ltr">Untrickable</span>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
80e227c1919c8520c1e07edc1753350bce526001
328
326
2023-12-19T16:11:45Z
HyperNervie
2
Created page with "必中"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|ambush=克制英雄
|ambush-x=克制英雄{1}
|aquatic=两栖
|armored=装甲
|armored-x=装甲{1}
|attackoverride=命攻
|bounce=弹射
|conjure=召唤
|conjures=召唤
|deadly=致命
|dinoroar=龙吼
|doublestrike=双重打击
|evolution=进化
|evolution-x={1}进化
|freeze=冻结
|frenzy=狂热
|gravestone=墓碑
|hunt=捕猎
|overshoot=先攻
|overshoot-x=先攻{1}
|shielded=保护
|splashdamage=溅射伤害
|splashdamage-x=溅射伤害{1}
|springboard=融合
|strikethrough=穿透
|teamup=组队
|truestrike=必中
|untrickable=锦囊免疫
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
937054fa6fb2724fcd2732e88f3640cde0ebaaa0
Translations:Template:Message/keyword/15/zh-hans
1198
194
304
2023-12-19T15:58:27Z
HyperNervie
2
Created page with "冻结"
wikitext
text/x-wiki
冻结
2db8b3e8880ee3eb5b5ac301f46ac2e1a23ab6a9
Translations:Template:Message/keyword/16/zh-hans
1198
195
306
2023-12-19T15:58:37Z
HyperNervie
2
Created page with "狂热"
wikitext
text/x-wiki
狂热
97093ce3d402aeff9051995376b2892e085facb0
Translations:Template:Message/keyword/17/zh-hans
1198
196
307
2023-12-19T15:58:43Z
HyperNervie
2
Created page with "墓碑"
wikitext
text/x-wiki
墓碑
76fb528116af8bde128601fd7f6650f7f3ab96cf
Translations:Template:Message/keyword/18/zh-hans
1198
197
310
2023-12-19T15:58:55Z
HyperNervie
2
Created page with "捕猎"
wikitext
text/x-wiki
捕猎
aece77606305f0115d791a87fc12e15115db142c
Translations:Template:Message/keyword/19/zh-hans
1198
198
312
2023-12-19T15:59:01Z
HyperNervie
2
Created page with "先攻"
wikitext
text/x-wiki
先攻
873e02046ff59610104cff1947112989ac7b05e4
Translations:Template:Message/keyword/20/zh-hans
1198
199
313
2023-12-19T15:59:08Z
HyperNervie
2
Created page with "先攻{1}"
wikitext
text/x-wiki
先攻{1}
cede7845c28d905a1b088db3741bbf1fa00759ad
Translations:Template:Message/keyword/21/qqq
1198
200
315
2023-12-19T16:09:40Z
HyperNervie
2
Created page with "Prior to 1.2.11, "can't get hurt" was a keyword called "Shielded". This keyword still remains in localization files, but no card description uses it."
wikitext
text/x-wiki
Prior to 1.2.11, "can't get hurt" was a keyword called "Shielded". This keyword still remains in localization files, but no card description uses it.
693296b929ec55a66ad2d45dfa29ea2535ef4ce0
Translations:Template:Message/keyword/21/zh-hans
1198
202
317
2023-12-19T16:10:42Z
HyperNervie
2
Created page with "保护"
wikitext
text/x-wiki
保护
a9eafe7f6f092d5577a982aae05e2a6f2e3f6eb5
Translations:Template:Message/keyword/22/zh-hans
1198
201
316
2023-12-19T16:10:50Z
HyperNervie
2
Created page with "溅射伤害"
wikitext
text/x-wiki
溅射伤害
065c5e0ad380f89cad3e8c8984e050dfde855124
Translations:Template:Message/keyword/23/zh-hans
1198
203
318
2023-12-19T16:11:01Z
HyperNervie
2
Created page with "溅射伤害{1}"
wikitext
text/x-wiki
溅射伤害{1}
e31ffff73d31270e7bf6a34157b2475719acc679
Translations:Template:Message/keyword/25/zh-hans
1198
204
320
2023-12-19T16:11:11Z
HyperNervie
2
Created page with "穿透"
wikitext
text/x-wiki
穿透
965eba5f7f967001fcee1d93547e31311f897574
Translations:Template:Message/keyword/24/zh-hans
1198
205
321
2023-12-19T16:11:11Z
HyperNervie
2
Created page with "融合"
wikitext
text/x-wiki
融合
90a08d32a7424c39c5c8c8913ba8eae8ba7f404c
Translations:Template:Message/keyword/26/zh-hans
1198
206
324
2023-12-19T16:11:16Z
HyperNervie
2
Created page with "组队"
wikitext
text/x-wiki
组队
8f6962c3b358b497c6e561c3999928e46fe79a98
Translations:Template:Message/keyword/27/zh-hans
1198
207
325
2023-12-19T16:11:22Z
HyperNervie
2
Created page with "必中"
wikitext
text/x-wiki
必中
30c2e10e2f64726722796b222a38bdbfc1f50e7d
Translations:Template:Message/keyword/28/zh-hans
1198
208
327
2023-12-19T16:11:29Z
HyperNervie
2
Created page with "锦囊免疫"
wikitext
text/x-wiki
锦囊免疫
71bc49ca1f52def55d2c29655295c30317bdfdcb
Template:Msg
10
209
329
2023-12-19T16:25:53Z
HyperNervie
2
Redirected page to [[Template:Message]]
wikitext
text/x-wiki
#redirect [[Template:Message]]
3a8bec225e62840dd0601ea7289317c32bc8d6e0
Module:Message
828
134
330
247
2023-12-20T11:34:24Z
HyperNervie
2
Scribunto
text/plain
local p = {}
function p.call(frame)
local args = frame:getParent().args
local lang = args.useLang or frame:preprocess("{{PAGELANGUAGE}}")
local availableLangs = {
["de"] = true,
["en"] = true,
["es"] = true,
["fr"] = true,
["it"] = true,
["ja"] = true,
["ko"] = true,
["pt"] = true,
["ru"] = true,
["zh-hans"] = true,
["zh-hant"] = true
}
if not availableLangs[lang] then
lang = "en"
end
local templateTitle = "Message/" .. args[1] .. "/" .. lang
local templateArgs = { key = args[2] }
local i = 3
while args[i] do
templateArgs[i-2] = args[i]
i = i + 1
end
return frame:expandTemplate{ title = templateTitle, args = templateArgs }
end
local function showMsgTable(msgTable)
local result = '{|class="wikitable sortable"\n|-\n!Key!!Value\n'
for k, v in pairs(msgTable) do
if type(k) == "string" then
result = result .. string.format('|-\n|%s\n|%s\n', k, v)
end
end
result = result .. "|}"
return result
end
function p.getMsg(frame)
local args = frame:getParent().args
if args.showTable then
return showMsgTable(frame.args)
end
if args.key == nil then
error("Message key is not given.")
end
local message = frame.args[args.key]
local subpage = frame.args[1]
if message == nil then
message = string.format("⧼[[Template:Message/%s|template-message-%s]]⧽", subpage, args.key)
end
for i, v in ipairs(args) do
message = string.gsub(message, '{' .. i .. '}', v)
end
return frame:preprocess(message)
end
return p
160e0cb0eec4cbf40d4500b26f9a322780c324e9
MediaWiki:Common.css
8
7
331
16
2023-12-20T11:42:07Z
HyperNervie
2
css
text/css
/* CSS placed here will be applied to all skins */
pre, code, tt, kbd, samp, .mw-code {
font-family: Consolas, 'Courier New', Courier, monospace;
}
code.key,
code.str,
code.num,
code.keyword {
border: none;
background-color: transparent;
padding: 0;
font-weight: bold;
}
code.key,
.mw-highlight-lang-json .nt {
color: #0451a5;
}
code.str,
code.key.string::before,
.mw-highlight-lang-json .s2 {
color: #a31515;
}
code.num,
code.key.number::before,
.mw-highlight-lang-json .mi,
.mw-highlight-lang-json .mf {
color: #098658;
}
code.keyword,
code.key.bool::before,
.mw-highlight-lang-json .kc {
color: #0000ff;
}
code.key.number::before {
content: "123";
}
code.key.bool::before {
content: "T/F";
}
code.key.string::before {
content: "\"S\"";
}
code.key.list::before {
content: "[,]";
color: #7b3814;
}
code.key.object::before {
content: "{:}";
color: #af00db;
}
code.key.number::before,
code.key.bool::before,
code.key.string::before,
code.key.list::before,
code.key.object::before {
margin-right: 6px;
}
.keyword a {
text-decoration: underline;
text-underline-offset: 4px;
}
.mw-highlight-lang-json .err,
.mw-highlight-lang-json .err + .kc,
.mw-highlight-lang-json .err + .w + .kc,
.mw-highlight-lang-json .err + .kc + .w + .kc {
color: #080;
font-weight: normal;
}
/* JSON treeview styles, adapted from Minecraft Wiki
See https://minecraft.wiki/w/MediaWiki:Gadget-site-styles.css
*/
.treeview {
display: flow-root;
}
.treeview .treeview-header {
padding-left: 3px;
font-weight: bold;
}
.treeview .treeview-header:last-child {
border-color: #707070 !important;
border-left-style: dotted;
}
.treeview .treeview-header:not(:last-child)::before {
content: none;
}
.treeview .treeview-header:last-child::before {
border-bottom: 0;
}
.treeview ul,
.treeview li {
margin: 0;
padding: 0;
list-style-type: none;
list-style-image: none;
}
.treeview li li {
position: relative;
padding-left: 13px;
margin-left: 7px;
border-left: 2px solid #707070;
}
.treeview li li::before {
content: "";
position: absolute;
top: 0;
left: -1.5px;
width: 11px;
height: 11px;
border-bottom: 2px solid #707070;
}
.treeview li li:last-child:not(.treeview-continue) {
border-color: transparent;
}
.treeview li li:last-child:not(.treeview-continue)::before {
border-left: 2px solid #707070;
width: 10px;
}
76dd3195c9ec4594aa842619e610d14d703ceec0
Template:Icon
10
75
332
149
2023-12-20T12:03:30Z
HyperNervie
2
wikitext
text/x-wiki
<includeonly>[[File:{{#switch:{{lc:{{{1}}} }}
|sun=Sun.png
|brain=Brain.png
|strength|attack=Strength.png
|health=Health.png
|multi=Multi Trait.png
|star|unique=Unique.png
|anti-hero|ambush=Anti-Hero.png
|armored|armor=Armored.png
|bullseye|truestrike=Bullseye.png
|deadly=Deadly.png
|double strike|doublestrike=Double Strike.png
|frenzy=Frenzy.png
|overshoot=Overshoot.png
|strikethrough=Strikethrough.png
|untrickable=Untrickable.png
|freeze=Freeze.png
|shielded|unhurtable=Shielded.png
|health-attack|attackoverride=Health-Attack.png
}}|{{{size|20px}}}|link=]]</includeonly><noinclude>{{documentation}}</noinclude>
f816c2533c749f2bfd11ab0da91f46aa03f097c1
333
332
2023-12-20T12:25:27Z
HyperNervie
2
wikitext
text/x-wiki
<includeonly>[[File:{{#switch:{{lc:{{{1}}} }}
|sun=Sun.png
|brain=Brain.png
|strength|attack|a=Strength.png
|health|h=Health.png
|multi=Multi Trait.png
|star|unique=Unique.png
|anti-hero|ambush=Anti-Hero.png
|armored|armor=Armored.png
|bullseye|truestrike=Bullseye.png
|deadly=Deadly.png
|double strike|doublestrike=Double Strike.png
|frenzy=Frenzy.png
|overshoot=Overshoot.png
|strikethrough=Strikethrough.png
|untrickable=Untrickable.png
|freeze=Freeze.png
|shielded|unhurtable=Shielded.png
|health-attack|attackoverride=Health-Attack.png
}}|{{{size|20px}}}|link=]]</includeonly><noinclude>{{documentation}}</noinclude>
3865454424c904ce3db844f8aec0fc96e2f7daf5
342
333
2023-12-20T13:18:47Z
HyperNervie
2
wikitext
text/x-wiki
<includeonly>[[File:{{#switch:{{lc:{{{1}}} }}
|sun|s=Sun.png
|brain|b=Brain.png
|strength|attack|a=Strength.png
|health|h=Health.png
|multi=Multi Trait.png
|star|unique=Unique.png
|anti-hero|ambush=Anti-Hero.png
|armored|armor=Armored.png
|bullseye|truestrike=Bullseye.png
|deadly=Deadly.png
|double strike|doublestrike=Double Strike.png
|frenzy=Frenzy.png
|overshoot=Overshoot.png
|strikethrough=Strikethrough.png
|untrickable=Untrickable.png
|freeze=Freeze.png
|shielded|unhurtable=Shielded.png
|health-attack|attackoverride=Health-Attack.png
}}|{{{size|20px}}}|link=]]</includeonly><noinclude>{{documentation}}</noinclude>
ef405ac28d72dad24129a3b32335f5a3af230f08
Template:Keyword
10
210
334
2023-12-20T12:25:41Z
HyperNervie
2
Created page with "<includeonly>{{#switch: {{lc:{{{1}}} }} |ambush|anti-hero |armored |attackoverride|health-attack |deadly |doublestrike|double strike |freeze |frenzy |overshoot |shielded|unhurtable |strikethrough |truestrike|bullseye |untrickable={{icon| {{{1}}} }} }}<span class="keyword"> {{#switch: {{lc:{{{1}}} }} |ambush|anti-hero={{msg|keyword|ambush}} |aquatic|amphibious={{msg|keyword|aquatic}} |armored={{msg|keyword|armored}} |attackoverride|health-attack={{msg|keyword|attackover..."
wikitext
text/x-wiki
<includeonly>{{#switch: {{lc:{{{1}}} }}
|ambush|anti-hero
|armored
|attackoverride|health-attack
|deadly
|doublestrike|double strike
|freeze
|frenzy
|overshoot
|shielded|unhurtable
|strikethrough
|truestrike|bullseye
|untrickable={{icon| {{{1}}} }}
}}<span class="keyword">[[ {{#switch: {{lc:{{{1}}} }}
|ambush|anti-hero={{msg|keyword|ambush}}
|aquatic|amphibious={{msg|keyword|aquatic}}
|armored={{msg|keyword|armored}}
|attackoverride|health-attack={{msg|keyword|attackoverride}}
|bounce={{msg|keyword|bounce}}
|conjure|conjures={{msg|keyword|conjure}}
|deadly={{msg|keyword|deadly}}
|dinoroar|dino-roar={{msg|keyword|dinoroar}}
|doublestrike|double strike={{msg|keyword|doublestrike}}
|evolution={{msg|keyword|evolution}}
|freeze={{msg|keyword|freeze}}
|frenzy={{msg|keyword|frenzy}}
|gravestone={{msg|keyword|gravestone}}
|hunt={{msg|keyword|hunt}}
|overshoot={{msg|keyword|overshoot}}
|shielded|unhurtable={{msg|keyword|shielded}}
|splashdamage|splash damage={{msg|keyword|splashdamage}}
|springboard|fusion={{msg|keyword|springboard}}
|strikethrough={{msg|keyword|strikethrough}}
|teamup|team-up={{msg|keyword|teamup}}
|truestrike|bullseye={{msg|keyword|truestrike}}
|untrickable={{msg|keyword|untrickable}}
}}{{LS}} |{{#switch: {{lc:{{{1}}} }}
|ambush|anti-hero={{#if:{{{2|}}} | {{msg|keyword|ambush-x|{{{2}}} }} | {{msg|keyword|ambush}} }}
|aquatic|amphibious={{msg|keyword|aquatic}}
|armored={{#if:{{{2|}}} | {{msg|keyword|armored-x|{{{2}}} }} | {{msg|keyword|armored}} }}
|attackoverride|health-attack={{msg|keyword|attackoverride}}
|bounce={{msg|keyword|bounce}}
|conjure={{msg|keyword|conjure}}
|conjures={{msg|keyword|conjures}}
|deadly={{msg|keyword|deadly}}
|dinoroar|dino-roar={{msg|keyword|dinoroar}}
|doublestrike|double strike={{msg|keyword|doublestrike}}
|evolution={{#if:{{{2|}}} | {{msg|keyword|evolution-x|{{{2}}} }} | {{msg|keyword|evolution}} }}
|freeze={{msg|keyword|freeze}}
|frenzy={{msg|keyword|frenzy}}
|gravestone={{msg|keyword|gravestone}}
|hunt={{msg|keyword|hunt}}
|overshoot={{#if:{{{2|}}} | {{msg|keyword|overshoot-x|{{{2}}} }} | {{msg|keyword|overshoot}} }}
|shielded|unhurtable={{msg|keyword|shielded}}
|splashdamage|splash damage={{#if:{{{2|}}} | {{msg|keyword|splashdamage-x|{{{2}}} }} | {{msg|keyword|splashdamage}} }}
|springboard|fusion={{msg|keyword|springboard}}
|strikethrough={{msg|keyword|strikethrough}}
|teamup|team-up={{msg|keyword|teamup}}
|truestrike|bullseye={{msg|keyword|truestrike}}
|untrickable={{msg|keyword|untrickable}}
}}]]</span></includeonly><noinclude>{{Documentation}}</noinclude>
98089d82da8e9c731399f646857f8b24bffb20c8
Template:Newline
10
211
335
2023-12-20T12:56:17Z
HyperNervie
2
Created page with " <noinclude> {{documentation}}[[Category:Workaround templates]] </noinclude>"
wikitext
text/x-wiki
<noinclude>
{{documentation}}[[Category:Workaround templates]]
</noinclude>
1fa013083ddb19d653119541153f76466bcce5f2
Template:\n
10
212
336
2023-12-20T12:58:50Z
HyperNervie
2
Redirected page to [[Template:Newline]]
wikitext
text/x-wiki
#redirect [[Template:Newline]]
a80bac44531c9fd2876f1b63a617cd58c6345c4e
Template:JSON structure
10
123
337
209
2023-12-20T13:02:52Z
HyperNervie
2
wikitext
text/x-wiki
<includeonly><tabber>
|-|<translate><!--T:1--> Treeview</translate>=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code><translate><!--T:2--> The <tvar name=1><code class="key">$data</code></tvar> object of the component.</translate>{{\n}} }}{{#if: {{{query|}}} |* <code class="key object"></code><translate><!--T:3--> The <tvar name=1><code class="key">$data</code></tvar> object of the query.</translate>{{\n}} }}{{{1}}}
</div>
|-|<translate><!--T:4--> Source</translate>=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | {{#ifeq: {{{component}}} | GrantTriggeredAbilityEffectDescriptor | Effects | Components }}.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
59c5398ea628b54b380e04c0df2d123bc4217c98
Template:JSON structure/zh-hans
10
128
338
214
2023-12-20T13:07:50Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<includeonly><tabber>
|-|树形图=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code>组件的<code class="key">$data</code>对象。{{\n}} }}{{#if: {{{query|}}} |* <code class="key object"></code>问询的<code class="key">$data</code>对象。{{\n}} }}{{{1}}}
</div>
|-|源代码=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | {{#ifeq: {{{component}}} | GrantTriggeredAbilityEffectDescriptor | Effects | Components }}.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
c5a904d14651785dfa110b74b7aa8f7334f73ef7
Template:JSON structure/en
10
133
339
219
2023-12-20T13:07:54Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<includeonly><tabber>
|-|Treeview=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code>The <code class="key">$data</code> object of the component.{{\n}} }}{{#if: {{{query|}}} |* <code class="key object"></code>The <code class="key">$data</code> object of the query.{{\n}} }}{{{1}}}
</div>
|-|Source=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | {{#ifeq: {{{component}}} | GrantTriggeredAbilityEffectDescriptor | Effects | Components }}.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
c82794fdb39828c8e8d9d4658f38f646157a43fa
Component/Card
0
9
340
108
2023-12-20T13:10:44Z
HyperNervie
2
wikitext
text/x-wiki
<languages/>
<translate><tvar name=1><code class="str">PvZCards.Engine.Components.Card</code></tvar> is a [[<tvar name=2>Component{{LS}}#Card entity components</tvar>|card entity component]] that identifies the [[<tvar name=3>Glossary{{LS}#GUID</tvar>|GUID]] of a card. Each card must have this component in their card entity.</translate>
== {{msg|section title|json-structure}} ==
{{JSON structure/{{PAGELANGUAGE}}|component=Card
|1=
** <code class="key number">Guid</code>: The card's GUID. Must match the key that the card definition object in [[cards.json]] is associated with.
|2={
"Guid": /* <translate>a positive integer</translate> */
}
}}
== {{msg|section title|see-also}} ==
* <translate><tvar name=1>{{Link/Component|Player}}</tvar> component - marks the game entity as a Hero,</translate>
* <translate><tvar name=1>{{Link/Component|Lane}}</tvar> component - marks the game entity as a lane.</translate>
== {{msg|section title|navigation}} ==
{{Components/{{PAGELANGUAGE}}|state2=collapsed}}
[[Category:Card entity component{{LS}}]]
43eb9fba10c77158043b38621a5510329c8491eb
341
340
2023-12-20T13:11:33Z
HyperNervie
2
wikitext
text/x-wiki
<languages/>
<translate><tvar name=1><code class="str">PvZCards.Engine.Components.Card</code></tvar> is a [[<tvar name=2>Component{{LS}}#Card entity components</tvar>|card entity component]] that identifies the <tvar name=3>[[Glossary{{LS}}#GUID|GUID]]</tvar> of a card. Each card must have this component in their card entity.</translate>
== {{msg|section title|json-structure}} ==
{{JSON structure/{{PAGELANGUAGE}}|component=Card
|1=
** <code class="key number">Guid</code>: The card's GUID. Must match the key that the card definition object in [[cards.json]] is associated with.
|2={
"Guid": /* <translate>a positive integer</translate> */
}
}}
== {{msg|section title|see-also}} ==
* <translate><tvar name=1>{{Link/Component|Player}}</tvar> component - marks the game entity as a Hero,</translate>
* <translate><tvar name=1>{{Link/Component|Lane}}</tvar> component - marks the game entity as a lane.</translate>
== {{msg|section title|navigation}} ==
{{Components/{{PAGELANGUAGE}}|state2=collapsed}}
[[Category:Card entity component{{LS}}]]
28a5e27d291d876b215b977b940accd30870fd38
Component
0
56
343
114
2023-12-20T13:39:05Z
HyperNervie
2
wikitext
text/x-wiki
'''Components''' are what constitute [[Glossary#game entity|game entities]] or [[Glossary#effect entity|effect entities]]. Each component defines a subset of an entity's properties and behaviors so that an entity can be defined with a set of components.
In [[cards.json]], components are represented as objects of the following structure:
{{JSON structure/{{PAGELANGUAGE}}
|1=
* <code class="key object"></code>The component object.
** <code class="key string">$type</code>: Type of the component, formatted in <code class="str">"PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <ComponentType> component, and it is documented on an individual page named "Component/<ComponentType>" on this wiki.
** <code class="key object">$data</code>: Data of the component. Different types of components may require data objects of different structures, which are discussed in their individual pages.
|2=
{
"$type": "PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {
/* data of the component */
}
}
}}
If a component constitutes a [[Glossary#card entity|card entity]], it is a '''card entity component'''. Likewise, a component is an '''effect entity components''' if it constitutes an effect entity.
== Card entity components ==
'''Card entity components''' are components used in card entities that determine the behaviors of a card ''during gameplay''.
=== Required ===
Each card entity ''must'' have these components:
; {{Link/Component|Card}}
: Mark the game entity as a card and set its [[Glossary#GUID|GUID]].
; {{Link/Component|SunCost}}
: Set the {{icon|s}} or {{icon|b}} cost of the card.
; {{Link/Component|Rarity}}
: Set the rarity of the card.
; Either or neither of
:; {{Link/Component|Burst}}
:: Make the card Trick.
:; {{Link/Component|Environment}}
:: Make the card Environment.
: Use neither to make the card Fighter.
; One and only one of
:; {{Link/Component|BoardAbility}}
:: Make the card Board Ability.
:; {{Link/Component|Plants}}
:: Make the card belong to the Plant faction.
:; {{Link/Component|Zombies}}
:: Make the card belong to the Zombie faction.
=== Optional ===
These are optional components that can be used in the card entities of cards.json:
; {{Link/Component|Aquatic}}
: Make the Fighter {{keyword|Amphibious}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Armor}}
: Make the Fighter {{keyword|Armored}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Attack}}
: Set the {{icon|a}} of the Fighter. This can be omitted if the Fighter has no {{icon|a}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttackOverride}}
: Give the Fighter {{keyword|Health-Attack}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksInAllLanes}}
: Make the Fighter attack in all five lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksOnlyInAdjacentLanes}}
: Make the Fighter attack in its adjacent lanes instead of its own lane.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|CreateInFront}}
: When created on a lane with a Friendly Fighter, make this card in front of that Friendly Fighter. Without this component, this card will be created behind that Friendly Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Deadly}}
: Make the card {{keyword|Deadly}}.
: This ''can'' be used on Plants, Tricks and Environments despite none of them having Deadly in vanilla cards.json.
; {{Link/Component|EffectEntitiesDescriptor}}
: Define the card's effect entities (i.e. its unique abilities).
; {{Link/Component|EvolutionRestriction}}
: Decide which Fighters this Fighter can evolve on. Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Evolvable}}
: Make the Fighter evolvable on other Fighters (i.e. {{keyword|Evolution|Blahblah}}). Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Frenzy}}
: Give the Fighter {{keyword|Frenzy}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|FromBurst}}
: Purpose unconfirmed.
; [[Components/GrantedTriggeredAbilities|GrantedTriggeredAbilities]]
: Grant the effect entities of another card to this card.
; {{Link/Component|Health}}
: Set the {{icon|h}} of the Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Multishot}}
: Make the Fighter attack in its own lane and its adjacent lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|PlaysFaceDown}}
: Hide the Zombie in a {{keyword|Gravestone}} when played ''from hand''. Not to be confused with {{Link/Component|FaceDown}}.
: This ''cannot'' be used on Plants, Tricks and Environments.
; {{Link/Component|PrimarySuperpower}}
: Make the card Signature Superpower.
; {{Link/Component|ShowTriggeredIcon}}
: Change the Fighter's {{icon|a}}/{{icon|h}} icons to indicate its triggered abilities.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|SplashDamage}}
: Make the Fighter do {{keyword|Splash Damage}} to Enemy Fighters next door when it attacks.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Springboard}}
: Make other Fighters able to be played on this Fighter (i.e. {{keyword|Fusion}}).
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Strikethrough}}
: Give the Fighter {{keyword|Strikethrough}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Subtypes}}
: Set the subtypes (often referred to as "tribes" in player community) of the card.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Superpower}}
: Make the card Superpower.
; {{Link/Component|Surprise}}
: Make AI tend to reserve this card.
; {{Link/Component|Tags}}
: Set the tags of the card. Tags can't be reflected from game texts, but they do affect some interactions between cards.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Teamup}}
: Give the Fighter {{keyword|Team-Up}}.
: This ''can'' be used on Zombies despite none of them having Team-Up in vanilla cards.json.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Truestrike}}
: Give the card {{keyword|Bullseye}}.
: This ''can'' be used on Tricks and Environments despite none of them having Bullseye in vanilla cards.json.
; {{Link/Component|Untrickable}}
: Make the card {{keyword|Untrickable}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Unusable}}
: Make the card unusable during gameplay.
=== Forbidden ===
These components ''cannot'' be used in the card entities of cards.json (in another word, you can't make cards "born" with these components). Technically, some of them are general '''game entity components''' as they can be used on game entities like Heroes and lanes, while some of them are not even card entity components as they can be used only on game entities that are not card entities.
Although these are forbidden in card entities of cards.json, some of them can be applied on game entities by other means. The structures of the <code class="key">$data</code> objects of these components are unknown.
; {{Link/Component|CanPlayFighterInSurprisePhase}}
: Make the Zombie Hero able to play Zombies during their Trick phase. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|DamageImmunity}}
: Purpose unconfirmed.
; {{Link/Component|Evolved}}
: Mark that the Fighter has evolved on another Fighter,
; {{Link/Component|FaceDown}}
: Mark that the Zombie is hiding in a Gravestone. Not to be confused with {{Link/Component|PlaysFaceDown}}.
; {{Link/Component|GrassTerrain}}
: Mark the game entity as a Ground lane.
; {{Link/Component|GravestoneSpy}}
: Make the Plant Hero able to see which Zombies are hiding in Gravestones. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|Graveyard}}
: Purpose unconfirmed.
; {{Link/Component|HighgroundTerrain}}
: Mark the game entity as a Heights lane.
; {{Link/Component|Lane}}
: Mark the game entity as a lane.
; {{Link/Component|MarkedForDeath}}
: Purpose unconfirmed.
; {{Link/Component|Mustache}}
: If the Fighter doesn't belong to the Mustache subtype, attach a mustache to it. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|Player}}
: Mark the game entity as a Hero.
; {{Link/Component|Unhealable}}
: Make the Hero or Fighter unable to get healed. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|WaterTerrain}}
: Mark the game entity as a Water lane.
{{Components/{{PAGELANGUAGE}} }}
[[Category:Glossary{{LS}}]]
2d5729d781ab01b9532c569df7e47f4c842c6cbc
344
343
2023-12-20T15:50:06Z
HyperNervie
2
wikitext
text/x-wiki
'''Components''' are what constitute [[Glossary#game entity|game entities]] or [[Glossary#effect entity|effect entities]]. Each component defines a subset of an entity's properties and behaviors so that an entity can be defined with a set of components.
In [[cards.json]], components are represented as objects of the following structure:
{{JSON structure/{{PAGELANGUAGE}}
|1=
* <code class="key object"></code>The component object.
** <code class="key string">$type</code>: Type of the component, formatted in <code class="str">"PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <ComponentType> component, and it is documented on an individual page named "Component/<ComponentType>" on this wiki.
** <code class="key object">$data</code>: Data of the component. Different types of components may require data objects of different structures, which are discussed in their individual pages.
|2=
{
"$type": "PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {
/* data of the component */
}
}
}}
If a component constitutes a [[Glossary#card entity|card entity]], it is a '''card entity component'''. Likewise, a component is an '''effect entity components''' if it constitutes an effect entity.
== Card entity components ==
'''Card entity components''' are components used in card entities that determine the behaviors of a card ''during gameplay''.
=== Required ===
Each card entity ''must'' have these components:
; {{Link/Component|Card}}
: Mark the game entity as a card and set its [[Glossary#GUID|GUID]].
; {{Link/Component|SunCost}}
: Set the {{icon|s}} or {{icon|b}} cost of the card.
; {{Link/Component|Rarity}}
: Set the rarity of the card.
; Either or neither of
:; {{Link/Component|Burst}}
:: Make the card Trick.
:; {{Link/Component|Environment}}
:: Make the card Environment.
: Use neither to make the card Fighter.
; One and only one of
:; {{Link/Component|BoardAbility}}
:: Make the card Board Ability.
:; {{Link/Component|Plants}}
:: Make the card belong to the Plant faction.
:; {{Link/Component|Zombies}}
:: Make the card belong to the Zombie faction.
=== Optional ===
These are optional components that can be used in the card entities of cards.json:
; {{Link/Component|Aquatic}}
: Make the Fighter {{keyword|Amphibious}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Armor}}
: Make the Fighter {{keyword|Armored}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Attack}}
: Set the {{icon|a}} of the Fighter. This can be omitted if the Fighter has no {{icon|a}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttackOverride}}
: Give the Fighter {{keyword|Health-Attack}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksInAllLanes}}
: Make the Fighter attack in all five lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksOnlyInAdjacentLanes}}
: Make the Fighter attack in its adjacent lanes instead of its own lane.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|CreateInFront}}
: When created on a lane with a Friendly Fighter, make this card in front of that Friendly Fighter. Without this component, this card will be created behind that Friendly Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Deadly}}
: Make the card {{keyword|Deadly}}.
: This ''can'' be used on Plants, Tricks and Environments despite none of them having Deadly in vanilla cards.json.
; {{Link/Component|EffectEntitiesDescriptor}}
: Define the card's effect entities (i.e. its unique abilities).
; {{Link/Component|EvolutionRestriction}}
: Decide which Fighters this Fighter can evolve on. Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Evolvable}}
: Make the Fighter evolvable on other Fighters (i.e. {{keyword|Evolution|Blahblah}}). Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Frenzy}}
: Give the Fighter {{keyword|Frenzy}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|FromBurst}}
: Purpose unconfirmed.
; [[Components/GrantedTriggeredAbilities|GrantedTriggeredAbilities]]
: Grant the effect entities of another card to this card.
; {{Link/Component|Health}}
: Set the {{icon|h}} of the Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Multishot}}
: Make the Fighter attack in its own lane and its adjacent lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|PlaysFaceDown}}
: Hide the Zombie in a {{keyword|Gravestone}} when played ''from hand''. Not to be confused with {{Link/Component|FaceDown}}.
: This ''cannot'' be used on Plants, Tricks and Environments.
; {{Link/Component|PrimarySuperpower}}
: Make the card Signature Superpower.
; {{Link/Component|ShowTriggeredIcon}}
: Change the Fighter's {{icon|a}}/{{icon|h}} icons to indicate its triggered abilities.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|SplashDamage}}
: Make the Fighter do {{keyword|Splash Damage}} to Enemy Fighters next door when it attacks.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Springboard}}
: Make other Fighters able to be played on this Fighter (i.e. {{keyword|Fusion}}).
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Strikethrough}}
: Give the Fighter {{keyword|Strikethrough}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Subtypes}}
: Set the subtypes (often referred to as "tribes" in player community) of the card.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Superpower}}
: Make the card Superpower.
; {{Link/Component|Surprise}}
: Make AI tend to reserve this card.
; {{Link/Component|Tags}}
: Set the tags of the card. Tags can't be reflected from game texts, but they do affect some interactions between cards.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Teamup}}
: Give the Fighter {{keyword|Team-Up}}.
: This ''can'' be used on Zombies despite none of them having Team-Up in vanilla cards.json.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Truestrike}}
: Give the card {{keyword|Bullseye}}.
: This ''can'' be used on Tricks and Environments despite none of them having Bullseye in vanilla cards.json.
; {{Link/Component|Untrickable}}
: Make the card {{keyword|Untrickable}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Unusable}}
: Make the card unusable during gameplay.
=== Forbidden ===
These components ''cannot'' be used in the card entities of cards.json (in another word, you can't make cards "born" with these components). Technically, some of them are general '''game entity components''' as they can be used on game entities like Heroes and lanes, while some of them are not even card entity components as they can be used only on game entities that are not card entities.
Although these are forbidden in card entities of cards.json, some of them can be applied on game entities by other means. The structures of the <code class="key">$data</code> objects of these components are unknown.
; {{Link/Component|CanPlayFighterInSurprisePhase}}
: Make the Zombie Hero able to play Zombies during their Trick phase. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|DamageImmunity}}
: Purpose unconfirmed.
; {{Link/Component|Evolved}}
: Mark that the Fighter has evolved on another Fighter,
; {{Link/Component|FaceDown}}
: Mark that the Zombie is hiding in a Gravestone. Not to be confused with {{Link/Component|PlaysFaceDown}}.
; {{Link/Component|GrassTerrain}}
: Mark the game entity as a Ground lane.
; {{Link/Component|GravestoneSpy}}
: Make the Plant Hero able to see which Zombies are hiding in Gravestones. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|Graveyard}}
: Purpose unconfirmed.
; {{Link/Component|HighgroundTerrain}}
: Mark the game entity as a Heights lane.
; {{Link/Component|Lane}}
: Mark the game entity as a lane.
; {{Link/Component|MarkedForDeath}}
: Purpose unconfirmed.
; {{Link/Component|Mustache}}
: If the Fighter doesn't belong to the Mustache subtype, attach a mustache to it. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|Player}}
: Mark the game entity as a Hero.
; {{Link/Component|Unhealable}}
: Make the Hero or Fighter unable to get healed. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|WaterTerrain}}
: Mark the game entity as a Water lane.
== Effect entity components ==
'''Effect entity components''' are components used in effect entities that determine the behaviors of an effect (i.e. a card ability). While many abilities are implemented using their dedicated components, most abilities are actually defined with effect entities within the card's {{Link/Component|EffectEntitiesDescriptor}} component. A card can have multiple effect entities at a time.
A typical effect entity consists of these components (not a universal composition):
* A {{Link/Component|EffectEntityGrouping}} component.
* A [[#Triggers|'''trigger component''']].
* Certain [[#Filters|'''filter components''']].
* An [[#Effect descriptors|'''effect descriptor component''']].
=== Triggers ===
When something happens during a match, an '''event''' will be raised, then all card entities will receive it to see if its effect entities are to be triggered. '''Trigger components''' (or simply '''triggers''') are what decide which kind of events the effect entity gets triggered upon. Note that effect entities don't necessarily take effect when triggered - the event must pass all [[#Filters|'''filters''']] and [[#Conditions|'''conditions''']] of the effect entity before the effect entity truly takes effect.
The <code class="key">$type</code> strings of all triggers are formatted in <code class="str">"PvZCards.Engine.Components.<TriggerType>Trigger, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <TriggerType> trigger.
; {{Link/Trigger|Buff}}
: Triggered when a Fighter gets buffed or nerfed (i.e. ±{{icon|a}}/±{{icon|h}}).
; {{Link/Trigger|CombatEnd}}
: Triggered at end of turn.
; {{Link/Trigger|Damage}}
: Triggered when a Hero or Fighter gets hurt.
; {{Link/Trigger|DestroyCard}}
: Triggered when a card is destroyed. What destroys the card can be filtered using a {{Link/Filter|TriggerSource}} filter.
; {{Link/Trigger|DiscardFromPlay}}
: Triggered when a card is destroyed. Unlike DestroyCardFilter, what destroys the card ''can't'' be filtered using a {{Link/Filter|TriggerSource}} filter.
; {{Link/Trigger|DrawCard}}
: Triggered when a Hero draws or {{keyword|conjures}} a card.
; {{Link/Trigger|DrawCardFromSubset}}
: Triggered when a Hero {{keyword|conjures}} a card.
; {{Link/Trigger|EnterBoard}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played.
: Unlike the {{Link/Trigger|Play}} trigger, this ''excludes'' when a Zombie is revealed from a Gravestone.
; {{Link/Trigger|ExtraAttack}}
: Triggered when a Fighter does a Bonus Attack.
; {{Link/Trigger|Heal}}
: Triggered when a Hero or Fighter is healed.
; {{Link/Trigger|LaneCombatEnd}}
: Triggered when the combat on a lane ends.
; {{Link/Trigger|LaneCombatStart}}
: Triggered when the combat on a lane starts.
; {{Link/Trigger|Move}}
: Triggered when a Fighter is moved.
; {{Link/Trigger|Play}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played;
:* When a Zombie is revealed from a Gravestone.
; {{Link/Trigger|ReturnToHand}}
: Triggered when a Fighter or Environment is [[Bounce{{LS}}|bounced]].
; {{Link/Trigger|Reveal}}
: Triggered when a Zombie is revealed from a Gravestone.
; {{Link/Trigger|RevealPhaseEnd}}
: Triggered after the phase when Zombies are supposed to be revealed from Gravestones, which happens ''after'' the start of Zombie Tricks phase.
; {{Link/Trigger|Slowed}}
: Triggered when a Fighter is [[Freeze{{LS}}|frozen]].
; {{Link/Trigger|SurprisePhaseStart}}
: Triggered at the start of Zombie Tricks phase. When a Zombie is revealed from a Gravestone, it misses the SurprisePhaseStart event of this turn.
; {{Link/Trigger|TurnStart}}
: Triggered at the start of turn.
== {{msg|section title|navigation}} ==
{{Components/{{PAGELANGUAGE}} }}
[[Category:Glossary{{LS}}]]
d3a7f798d1e5971c3df8a30c47c0cdec313cbf3a
352
344
2023-12-20T17:08:48Z
HyperNervie
2
wikitext
text/x-wiki
'''Components''' are what constitute [[Glossary#game entity|game entities]] or [[Glossary#effect entity|effect entities]]. Each component defines a subset of an entity's properties and behaviors so that an entity can be defined with a set of components.
In [[cards.json]], components are represented as objects of the following structure:
{{JSON structure/{{PAGELANGUAGE}}
|1=
* <code class="key object"></code>The component object.
** <code class="key string">$type</code>: Type of the component, formatted in <code class="str">"PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <ComponentType> component, and it is documented on an individual page named "Component/<ComponentType>" on this wiki.
** <code class="key object">$data</code>: Data of the component. Different types of components may require data objects of different structures, which are discussed in their individual pages.
|2=
{
"$type": "PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {
/* data of the component */
}
}
}}
If a component constitutes a [[Glossary#card entity|card entity]], it is a '''card entity component'''. Likewise, a component is an '''effect entity components''' if it constitutes an effect entity.
== Card entity components ==
'''Card entity components''' are components used in card entities that determine the behaviors of a card ''during gameplay''.
=== Required ===
Each card entity ''must'' have these components:
; {{Link/Component|Card}}
: Mark the game entity as a card and set its [[Glossary#GUID|GUID]].
; {{Link/Component|SunCost}}
: Set the {{icon|s}} or {{icon|b}} cost of the card.
; {{Link/Component|Rarity}}
: Set the rarity of the card.
; Either or neither of
:; {{Link/Component|Burst}}
:: Make the card Trick.
:; {{Link/Component|Environment}}
:: Make the card Environment.
: Use neither to make the card Fighter.
; One and only one of
:; {{Link/Component|BoardAbility}}
:: Make the card Board Ability.
:; {{Link/Component|Plants}}
:: Make the card belong to the Plant faction.
:; {{Link/Component|Zombies}}
:: Make the card belong to the Zombie faction.
=== Optional ===
These are optional components that can be used in the card entities of cards.json:
; {{Link/Component|Aquatic}}
: Make the Fighter {{keyword|Amphibious}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Armor}}
: Make the Fighter {{keyword|Armored}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Attack}}
: Set the {{icon|a}} of the Fighter. This can be omitted if the Fighter has no {{icon|a}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttackOverride}}
: Give the Fighter {{keyword|Health-Attack}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksInAllLanes}}
: Make the Fighter attack in all five lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksOnlyInAdjacentLanes}}
: Make the Fighter attack in its adjacent lanes instead of its own lane.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|CreateInFront}}
: When created on a lane with a Friendly Fighter, make this card in front of that Friendly Fighter. Without this component, this card will be created behind that Friendly Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Deadly}}
: Make the card {{keyword|Deadly}}.
: This ''can'' be used on Plants, Tricks and Environments despite none of them having Deadly in vanilla cards.json.
; {{Link/Component|EffectEntitiesDescriptor}}
: Define the card's effect entities (i.e. its unique abilities).
; {{Link/Component|EvolutionRestriction}}
: Decide which Fighters this Fighter can evolve on. Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Evolvable}}
: Make the Fighter evolvable on other Fighters (i.e. {{keyword|Evolution|Blahblah}}). Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Frenzy}}
: Give the Fighter {{keyword|Frenzy}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|FromBurst}}
: Purpose unconfirmed.
; [[Components/GrantedTriggeredAbilities|GrantedTriggeredAbilities]]
: Grant the effect entities of another card to this card.
; {{Link/Component|Health}}
: Set the {{icon|h}} of the Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Multishot}}
: Make the Fighter attack in its own lane and its adjacent lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|PlaysFaceDown}}
: Hide the Zombie in a {{keyword|Gravestone}} when played ''from hand''. Not to be confused with {{Link/Component|FaceDown}}.
: This ''cannot'' be used on Plants, Tricks and Environments.
; {{Link/Component|PrimarySuperpower}}
: Make the card Signature Superpower.
; {{Link/Component|ShowTriggeredIcon}}
: Change the Fighter's {{icon|a}}/{{icon|h}} icons to indicate its triggered abilities.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|SplashDamage}}
: Make the Fighter do {{keyword|Splash Damage}} to Enemy Fighters next door when it attacks.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Springboard}}
: Make other Fighters able to be played on this Fighter (i.e. {{keyword|Fusion}}).
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Strikethrough}}
: Give the Fighter {{keyword|Strikethrough}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Subtypes}}
: Set the subtypes (often referred to as "tribes" in player community) of the card.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Superpower}}
: Make the card Superpower.
; {{Link/Component|Surprise}}
: Make AI tend to reserve this card.
; {{Link/Component|Tags}}
: Set the tags of the card. Tags can't be reflected from game texts, but they do affect some interactions between cards.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Teamup}}
: Give the Fighter {{keyword|Team-Up}}.
: This ''can'' be used on Zombies despite none of them having Team-Up in vanilla cards.json.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Truestrike}}
: Give the card {{keyword|Bullseye}}.
: This ''can'' be used on Tricks and Environments despite none of them having Bullseye in vanilla cards.json.
; {{Link/Component|Untrickable}}
: Make the card {{keyword|Untrickable}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Unusable}}
: Make the card unusable during gameplay.
=== Forbidden ===
These components ''cannot'' be used in the card entities of cards.json (in another word, you can't make cards "born" with these components). Technically, some of them are general '''game entity components''' as they can be used on game entities like Heroes and lanes, while some of them are not even card entity components as they can be used only on game entities that are not card entities.
Although these are forbidden in card entities of cards.json, some of them can be applied on game entities by other means. The structures of the <code class="key">$data</code> objects of these components are unknown.
; {{Link/Component|CanPlayFighterInSurprisePhase}}
: Make the Zombie Hero able to play Zombies during their Trick phase. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|DamageImmunity}}
: Purpose unconfirmed.
; {{Link/Component|Evolved}}
: Mark that the Fighter has evolved on another Fighter,
; {{Link/Component|FaceDown}}
: Mark that the Zombie is hiding in a Gravestone. Not to be confused with {{Link/Component|PlaysFaceDown}}.
; {{Link/Component|GrassTerrain}}
: Mark the game entity as a Ground lane.
; {{Link/Component|GravestoneSpy}}
: Make the Plant Hero able to see which Zombies are hiding in Gravestones. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|Graveyard}}
: Purpose unconfirmed.
; {{Link/Component|HighgroundTerrain}}
: Mark the game entity as a Heights lane.
; {{Link/Component|Lane}}
: Mark the game entity as a lane.
; {{Link/Component|MarkedForDeath}}
: Purpose unconfirmed.
; {{Link/Component|Mustache}}
: If the Fighter doesn't belong to the Mustache subtype, attach a mustache to it. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|Player}}
: Mark the game entity as a Hero.
; {{Link/Component|Unhealable}}
: Make the Hero or Fighter unable to get healed. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|WaterTerrain}}
: Mark the game entity as a Water lane.
== Effect entity components ==
'''Effect entity components''' are components used in effect entities that determine the behaviors of an effect (i.e. a card ability). While many abilities are implemented using their dedicated components, most abilities are actually defined with effect entities within the card's {{Link/Component|EffectEntitiesDescriptor}} component. A card can have multiple effect entities at a time.
A typical effect entity consists of these components (not a universal composition):
* A {{Link/Component|EffectEntityGrouping}} component.
* A [[#Triggers|'''trigger component''']].
* Certain [[#Filters|'''filter components''']].
* An [[#Effect descriptors|'''effect descriptor component''']].
=== Triggers ===
When something happens during a match, an '''event''' will be raised, then all card entities will receive it to see if its effect entities are to be triggered. '''Trigger components''' (or simply '''triggers''') are what decide which kind of events the effect entity gets triggered upon. Note that effect entities don't necessarily take effect when triggered - the event must pass all [[#Filters|'''filters''']] and [[#Conditions|'''conditions''']] of the effect entity before the effect entity truly takes effect.
The <code class="key">$type</code> strings of all triggers are formatted in <code class="str">"PvZCards.Engine.Components.<TriggerType>Trigger, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <TriggerType> trigger.
The <code class="key">$data</code> objects of all triggers are empty.
Events that trigger effect entities may or may not carry a '''trigger source''' and/or a '''trigger target'''. The source and target can be filtered using {{Link/Filter|TriggerSource}} and {{Link/Filter|TriggerTarget}} filters respectively.
; {{Link/Component|TurnStartTrigger}}
: Triggered at the start of turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|SurprisePhaseStartTrigger}}
: Triggered at the start of Zombie Tricks phase. When a Zombie is revealed from a Gravestone, it misses the SurprisePhaseStart event of this turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|RevealPhaseEndTrigger}}
: Triggered after the phase when Zombies are supposed to be revealed from Gravestones, which happens ''after'' the start of Zombie Tricks phase.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|LaneCombatStartTrigger}}
: Triggered when the combat on a lane starts.
: '''Source:''' None.
: '''Target:''' The lane where combat takes place.
; {{Link/Component|LaneCombatEndTrigger}}
: Triggered when the combat on a lane ends.
: '''Source:''' None.
: '''Target:''' The lane where combat takes place.
; {{Link/Component|CombatEndTrigger}}
: Triggered at end of turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|BuffTrigger}}
: Triggered when a Fighter gets buffed or nerfed (i.e. ±{{icon|a}}/±{{icon|h}}).
: '''Source:''' The card that buffs or nerfs the Fighter.
: '''Target:''' The buffed or nerfed Fighter.
; {{Link/Component|DamageTrigger}}
: Triggered when a Hero or Fighter gets hurt.
: '''Source:''' The card that hurts the Hero or Fighter.
: '''Target:''' The Hero or Fighter that gets hurt.
; {{Link/Component|DestroyCardTrigger}}
: Triggered when a card is destroyed.
: '''Source:''' The card that destroys the target card.
: '''Target:''' The destroyed card.
; {{Link/Component|DiscardFromPlayTrigger}}
: Triggered when a card is destroyed.
: '''Source:''' None.
: '''Target:''' The destroyed card.
; {{Link/Component|DrawCardTrigger}}
: Triggered when a Hero draws a card (including [[Conjure{{LS}}|Conjuring]]).
: '''Source:''' The card that makes the Hero draw a card.
: '''Target:''' The Hero that draws a card.
; {{Link/Component|DrawCardFromSubsetTrigger}}
: Triggered when a Hero {{keyword|conjures}} a card.
: '''Source:''' The card that makes the Hero {{keyword|conjure}} a card.
: '''Target:''' The Hero that {{keyword|conjures}} a card.
; {{Link/Component|EnterBoardTrigger}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played.
: Unlike the {{Link/Trigger|Play}} trigger, this ''excludes'' when a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The played card.
; {{Link/Component|ExtraAttackTrigger}}
: Triggered when a Fighter does a Bonus Attack.
: '''Source:''' None.
: '''Target:''' The Fighter that does a Bonus Attack.
; {{Link/Component|HealTrigger}}
: Triggered when a Hero or Fighter is healed.
: '''Source:''' None.
: '''Target:''' The Hero or Fighter that gets healed.
; {{Link/Component|MoveTrigger}}
: Triggered when a Fighter is moved.
: '''Source:''' None.
: '''Target:''' The moved Fighter.
; {{Link/Component|PlayTrigger}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played;
:* When a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The played card.
; {{Link/Component|ReturnToHandTrigger}}
: Triggered when a Fighter or Environment is [[Bounce{{LS}}|bounced]].
: '''Source:''' None.
: '''Target:''' The bounced card.
; {{Link/Component|RevealTrigger}}
: Triggered when a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The revealed Zombie.
; {{Link/Component|SlowedTrigger}}
: Triggered when a Fighter is [[Freeze{{LS}}|frozen]].
: '''Source:''' None.
: '''Target:''' The frozen Fighter.
=== Filters ===
The <code class="key">$type</code> strings of all '''filter components''' (or simply '''filters''') are formatted in <code class="str">"PvZCards.Engine.Components.<FilterType>Filter, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <FilterType> filter.
; {{Link/Component|TriggerSourceFilter}}
: If the trigger source gets filtered out by the TriggerSource filter, the effect entity will not take effect.
; {{Link/Component|TriggerTargetFilter}}
: If the trigger target gets filtered out by the TriggerTarget filter, the effect entity will not take effect.
; {{Link/Component|SelfEntityFilter}}
: If the card entity where the effect entity resides gets filtered out by the SelfEntity filter, the effect entity will not take effect.
; {{Link/Component|PrimaryTargetFilter}}
: If a game entity gets filtered out by the PrimaryTarget filter, it will not be chosen as the primary target of the effect.
: Every effect should have a primary target. If no game entities can be chosen, the effect entity will not take effect.
; {{Link/Component|SecondaryTargetFilter}}
: If a game entity gets filtered out by the SecondaryTarget filter, it will not be chosen as the secondary target of the effect.
: Only move effect has a secondary target (which is the target lane of the moved Fighter). If no game entities can be chosen, the effect entity will not take effect.
== {{msg|section title|navigation}} ==
{{Components/{{PAGELANGUAGE}} }}
[[Category:Glossary{{LS}}]]
073973715ca27721a9e75de95f7db0c9170c59d8
Template:Link/Component
10
86
345
167
2023-12-20T15:53:18Z
HyperNervie
2
wikitext
text/x-wiki
[[Component/{{{1}}}{{LS}}|{{{2|{{{1}}}}}}]]<noinclude>
{{Documentation}}
</noinclude>
e388d3adb5391800d4a2dd285a2cdc9858602259
Template:Link/Query
10
92
346
173
2023-12-20T15:54:44Z
HyperNervie
2
wikitext
text/x-wiki
[[Query/{{{1}}}{{LS}}|{{{2|{{{1}}}}}}]]<noinclude>
{{Documentation}}
</noinclude>
e6e0cd2dfd3bb7aacdc756adb7b2a6c4a6ffd5fb
Template:Link/Trigger
10
87
347
168
2023-12-20T15:55:07Z
HyperNervie
2
wikitext
text/x-wiki
[[Component/{{{1}}}Trigger{{LS}}|{{{2|{{{1}}}}}}]]<noinclude>
{{Documentation}}
</noinclude>
01227b7654694988d33e3e1348d28ad282c8c23e
Template:Link/Filter
10
88
348
169
2023-12-20T15:55:39Z
HyperNervie
2
wikitext
text/x-wiki
[[Component/{{{1}}}Filter{{LS}}|{{{2|{{{1}}}}}}]]<noinclude>
{{Documentation}}
</noinclude>
ca5fb5ee40c0adc278d08a1f7cb5baf76a6fd9aa
Template:Link/EffectDescriptor
10
89
349
170
2023-12-20T15:56:07Z
HyperNervie
2
wikitext
text/x-wiki
[[Component/{{{1}}}EffectDescriptor{{LS}}|{{{2|{{{1}}}}}}]]<noinclude>
{{Documentation}}
</noinclude>
6450f9b825ad8086bfba17c10ad4a40f0b5dbe91
Template:Link/Condition
10
91
350
172
2023-12-20T15:56:32Z
HyperNervie
2
wikitext
text/x-wiki
[[Component/{{{1}}}Condition{{LS}}|{{{2|{{{1}}}}}}]]<noinclude>
{{Documentation}}
</noinclude>
0c8ad7868bf94133eeb1df103e0b569cb94748cf
Template:Link/Multiplier
10
90
351
171
2023-12-20T15:57:18Z
HyperNervie
2
wikitext
text/x-wiki
[[Component/{{{1}}}Multiplier{{LS}}|{{{2|{{{1}}}}}}]]<noinclude>
{{Documentation}}
</noinclude>
ef6f57731b92069b14d41401705c1d6d41d5d901
Component
0
56
353
352
2023-12-20T17:55:54Z
HyperNervie
2
Effect descriptors
wikitext
text/x-wiki
'''Components''' are what constitute [[Glossary#game entity|game entities]] or [[Glossary#effect entity|effect entities]]. Each component defines a subset of an entity's properties and behaviors so that an entity can be defined with a set of components.
In [[cards.json]], components are represented as objects of the following structure:
{{JSON structure/{{PAGELANGUAGE}}
|1=
* <code class="key object"></code>The component object.
** <code class="key string">$type</code>: Type of the component, formatted in <code class="str">"PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <ComponentType> component, and it is documented on an individual page named "Component/<ComponentType>" on this wiki.
** <code class="key object">$data</code>: Data of the component. Different types of components may require data objects of different structures, which are discussed in their individual pages.
|2=
{
"$type": "PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {
/* data of the component */
}
}
}}
If a component constitutes a [[Glossary#card entity|card entity]], it is a '''card entity component'''. Likewise, a component is an '''effect entity components''' if it constitutes an effect entity.
== Card entity components ==
'''Card entity components''' are components used in card entities that determine the behaviors of a card ''during gameplay''.
=== Required ===
Each card entity ''must'' have these components:
; {{Link/Component|Card}}
: Mark the game entity as a card and set its [[Glossary#GUID|GUID]].
; {{Link/Component|SunCost}}
: Set the {{icon|s}} or {{icon|b}} cost of the card.
; {{Link/Component|Rarity}}
: Set the rarity of the card.
; Either or neither of
:; {{Link/Component|Burst}}
:: Make the card Trick.
:; {{Link/Component|Environment}}
:: Make the card Environment.
: Use neither to make the card Fighter.
; One and only one of
:; {{Link/Component|BoardAbility}}
:: Make the card Board Ability.
:; {{Link/Component|Plants}}
:: Make the card belong to the Plant faction.
:; {{Link/Component|Zombies}}
:: Make the card belong to the Zombie faction.
=== Optional ===
These are optional components that can be used in the card entities of cards.json:
; {{Link/Component|Aquatic}}
: Make the Fighter {{keyword|Amphibious}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Armor}}
: Make the Fighter {{keyword|Armored}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Attack}}
: Set the {{icon|a}} of the Fighter. This can be omitted if the Fighter has no {{icon|a}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttackOverride}}
: Give the Fighter {{keyword|Health-Attack}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksInAllLanes}}
: Make the Fighter attack in all five lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksOnlyInAdjacentLanes}}
: Make the Fighter attack in its adjacent lanes instead of its own lane.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|CreateInFront}}
: When created on a lane with a Friendly Fighter, make this card in front of that Friendly Fighter. Without this component, this card will be created behind that Friendly Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Deadly}}
: Make the card {{keyword|Deadly}}.
: This ''can'' be used on Plants, Tricks and Environments despite none of them having Deadly in vanilla cards.json.
; {{Link/Component|EffectEntitiesDescriptor}}
: Define the card's effect entities (i.e. its unique abilities).
; {{Link/Component|EvolutionRestriction}}
: Decide which Fighters this Fighter can evolve on. Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Evolvable}}
: Make the Fighter evolvable on other Fighters (i.e. {{keyword|Evolution|Blahblah}}). Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Frenzy}}
: Give the Fighter {{keyword|Frenzy}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|FromBurst}}
: Purpose unconfirmed.
; [[Components/GrantedTriggeredAbilities|GrantedTriggeredAbilities]]
: Grant the effect entities of another card to this card.
; {{Link/Component|Health}}
: Set the {{icon|h}} of the Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Multishot}}
: Make the Fighter attack in its own lane and its adjacent lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|PlaysFaceDown}}
: Hide the Zombie in a {{keyword|Gravestone}} when played ''from hand''. Not to be confused with {{Link/Component|FaceDown}}.
: This ''cannot'' be used on Plants, Tricks and Environments.
; {{Link/Component|PrimarySuperpower}}
: Make the card Signature Superpower.
; {{Link/Component|ShowTriggeredIcon}}
: Change the Fighter's {{icon|a}}/{{icon|h}} icons to indicate its triggered abilities.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|SplashDamage}}
: Make the Fighter do {{keyword|Splash Damage}} to Enemy Fighters next door when it attacks.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Springboard}}
: Make other Fighters able to be played on this Fighter (i.e. {{keyword|Fusion}}).
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Strikethrough}}
: Give the Fighter {{keyword|Strikethrough}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Subtypes}}
: Set the subtypes (often referred to as "tribes" in player community) of the card.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Superpower}}
: Make the card Superpower.
; {{Link/Component|Surprise}}
: Make AI tend to reserve this card.
; {{Link/Component|Tags}}
: Set the tags of the card. Tags can't be reflected from game texts, but they do affect some interactions between cards.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Teamup}}
: Give the Fighter {{keyword|Team-Up}}.
: This ''can'' be used on Zombies despite none of them having Team-Up in vanilla cards.json.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Truestrike}}
: Give the card {{keyword|Bullseye}}.
: This ''can'' be used on Tricks and Environments despite none of them having Bullseye in vanilla cards.json.
; {{Link/Component|Untrickable}}
: Make the card {{keyword|Untrickable}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Unusable}}
: Make the card unusable during gameplay.
=== Forbidden ===
These components ''cannot'' be used in the card entities of cards.json (in another word, you can't make cards "born" with these components). Technically, some of them are general '''game entity components''' as they can be used on game entities like Heroes and lanes, while some of them are not even card entity components as they can be used only on game entities that are not card entities.
Although these are forbidden in card entities of cards.json, some of them can be applied on game entities by other means. The structures of the <code class="key">$data</code> objects of these components are unknown.
; {{Link/Component|CanPlayFighterInSurprisePhase}}
: Make the Zombie Hero able to play Zombies during their Trick phase. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|DamageImmunity}}
: Purpose unconfirmed.
; {{Link/Component|Evolved}}
: Mark that the Fighter has evolved on another Fighter,
; {{Link/Component|FaceDown}}
: Mark that the Zombie is hiding in a Gravestone. Not to be confused with {{Link/Component|PlaysFaceDown}}.
; {{Link/Component|GrassTerrain}}
: Mark the game entity as a Ground lane.
; {{Link/Component|GravestoneSpy}}
: Make the Plant Hero able to see which Zombies are hiding in Gravestones. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|Graveyard}}
: Purpose unconfirmed.
; {{Link/Component|HighgroundTerrain}}
: Mark the game entity as a Heights lane.
; {{Link/Component|Lane}}
: Mark the game entity as a lane.
; {{Link/Component|MarkedForDeath}}
: Purpose unconfirmed.
; {{Link/Component|Mustache}}
: If the Fighter doesn't belong to the Mustache subtype, attach a mustache to it. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|Player}}
: Mark the game entity as a Hero.
; {{Link/Component|Unhealable}}
: Make the Hero or Fighter unable to get healed. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|WaterTerrain}}
: Mark the game entity as a Water lane.
== Effect entity components ==
'''Effect entity components''' are components used in effect entities that determine the behaviors of an effect (i.e. a card ability). While many abilities are implemented using their dedicated components, most abilities are actually defined with effect entities within the card's {{Link/Component|EffectEntitiesDescriptor}} component. A card can have multiple effect entities at a time.
A typical effect entity consists of these components (not a universal composition):
* A {{Link/Component|EffectEntityGrouping}} component.
* A [[#Triggers|'''trigger component''']].
* Certain [[#Filters|'''filter components''']].
* An [[#Effect descriptors|'''effect descriptor component''']].
=== Triggers ===
When something happens during a match, an '''event''' will be raised, then all card entities will receive it to see if its effect entities are to be triggered. '''Trigger components''' (or simply '''triggers''') decide which kind of events the effect entity gets triggered upon. Note that effect entities don't necessarily take effect when triggered - the event must pass all [[#Filters|'''filters''']] and [[#Conditions|'''conditions''']] of the effect entity before the effect entity truly takes effect.
The <code class="key">$type</code> strings of all triggers are formatted in <code class="str">"PvZCards.Engine.Components.<TriggerType>Trigger, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <TriggerType> trigger.
The <code class="key">$data</code> objects of all triggers are empty.
Events that trigger effect entities may or may not carry a '''trigger source''' and/or a '''trigger target'''. The source and target can be filtered using {{Link/Filter|TriggerSource}} and {{Link/Filter|TriggerTarget}} filters respectively.
; {{Link/Component|TurnStartTrigger}}
: Triggered at the start of turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|SurprisePhaseStartTrigger}}
: Triggered at the start of Zombie Tricks phase. When a Zombie is revealed from a Gravestone, it misses the SurprisePhaseStart event of this turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|RevealPhaseEndTrigger}}
: Triggered after the phase when Zombies are supposed to be revealed from Gravestones, which happens ''after'' the start of Zombie Tricks phase.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|LaneCombatStartTrigger}}
: Triggered when the combat on a lane starts.
: '''Source:''' None.
: '''Target:''' The lane where combat takes place.
; {{Link/Component|LaneCombatEndTrigger}}
: Triggered when the combat on a lane ends.
: '''Source:''' None.
: '''Target:''' The lane where combat takes place.
; {{Link/Component|CombatEndTrigger}}
: Triggered at end of turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|BuffTrigger}}
: Triggered when a Fighter gets buffed or nerfed (i.e. ±{{icon|a}}/±{{icon|h}}).
: '''Source:''' The card that buffs or nerfs the Fighter.
: '''Target:''' The buffed or nerfed Fighter.
; {{Link/Component|DamageTrigger}}
: Triggered when a Hero or Fighter gets hurt.
: '''Source:''' The card that hurts the Hero or Fighter.
: '''Target:''' The Hero or Fighter that gets hurt.
; {{Link/Component|DestroyCardTrigger}}
: Triggered when a card is destroyed.
: '''Source:''' The card that destroys the target card.
: '''Target:''' The destroyed card.
; {{Link/Component|DiscardFromPlayTrigger}}
: Triggered when a card is destroyed.
: '''Source:''' None.
: '''Target:''' The destroyed card.
; {{Link/Component|DrawCardTrigger}}
: Triggered when a Hero draws a card (including [[Conjure{{LS}}|Conjuring]]).
: '''Source:''' The card that makes the Hero draw a card.
: '''Target:''' The Hero that draws a card.
; {{Link/Component|DrawCardFromSubsetTrigger}}
: Triggered when a Hero {{keyword|conjures}} a card.
: '''Source:''' The card that makes the Hero {{keyword|conjure}} a card.
: '''Target:''' The Hero that {{keyword|conjures}} a card.
; {{Link/Component|EnterBoardTrigger}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played.
: Unlike the {{Link/Trigger|Play}} trigger, this ''excludes'' when a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The played card.
; {{Link/Component|ExtraAttackTrigger}}
: Triggered when a Fighter does a Bonus Attack.
: '''Source:''' None.
: '''Target:''' The Fighter that does a Bonus Attack.
; {{Link/Component|HealTrigger}}
: Triggered when a Hero or Fighter is healed.
: '''Source:''' None.
: '''Target:''' The Hero or Fighter that gets healed.
; {{Link/Component|MoveTrigger}}
: Triggered when a Fighter is moved.
: '''Source:''' None.
: '''Target:''' The moved Fighter.
; {{Link/Component|PlayTrigger}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played;
:* When a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The played card.
; {{Link/Component|ReturnToHandTrigger}}
: Triggered when a Fighter or Environment is [[Bounce{{LS}}|bounced]].
: '''Source:''' None.
: '''Target:''' The bounced card.
; {{Link/Component|RevealTrigger}}
: Triggered when a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The revealed Zombie.
; {{Link/Component|SlowedTrigger}}
: Triggered when a Fighter is [[Freeze{{LS}}|frozen]].
: '''Source:''' None.
: '''Target:''' The frozen Fighter.
=== Filters ===
The <code class="key">$type</code> strings of all '''filter components''' (or simply '''filters''') are formatted in <code class="str">"PvZCards.Engine.Components.<FilterType>Filter, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <FilterType> filter.
; {{Link/Component|TriggerSourceFilter}}
: If the trigger source gets filtered out by the TriggerSource filter, the effect entity will not take effect.
; {{Link/Component|TriggerTargetFilter}}
: If the trigger target gets filtered out by the TriggerTarget filter, the effect entity will not take effect.
; {{Link/Component|SelfEntityFilter}}
: If the card ifself gets filtered out by the SelfEntity filter, the effect entity will not take effect.
; {{Link/Component|PrimaryTargetFilter}}
: If a game entity gets filtered out by the PrimaryTarget filter, it will not be chosen as the primary target of the effect.
: Every effect should have a primary target. If no game entities can be chosen, the effect entity will not take effect.
; {{Link/Component|SecondaryTargetFilter}}
: If a game entity gets filtered out by the SecondaryTarget filter, it will not be chosen as the secondary target of the effect.
: Only move effect has a secondary target (which is the target lane of the moved Fighter). If no game entities can be chosen, the effect entity will not take effect.
=== Effect descriptors ===
The <code class="key">$type</code> strings of all '''effect descriptor components''' (or simply '''effect descriptors''') are formatted in <code class="str">"PvZCards.Engine.Components.<EffectDescriptorType>EffectDescriptor, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <EffectDescriptorType> effect descriptor.
; {{Link/Component|AttackInLaneEffectDescriptor}}
: Launch an attack in the target lane.
; {{Link/Component|BuffEffectDescriptor}}
: Buff or nerf the target Fighter.
; {{Link/Component|ChargeBlockMeterEffectDescriptor}}
: Charge or discharge the target Hero's Super Block Meter.
; {{Link/Component|CopyCardEffectDescriptor}}
: Make a copy of the card itself on the target lane.
; {{Link/Component|CopyStatsEffectDescriptor}}
: Set the original {{icon|a}}/{{icon|h}} of the Fighter itself to the target Fighter's.
; {{Link/Component|CreateCardEffectDescriptor}}
: Make a specific card in the target lane.
; {{Link/Component|CreateCardFromSubsetEffectDescriptor}}
: Select a random card from a subset, then make it in the target lane.
; {{Link/Component|CreateCardInDeckEffectDescriptor}}
: Shuffle one or more copies of a specific card into the target Hero's deck.
; {{Link/Component|DamageEffectDescriptor}}
: Do damage to the target Hero or Fighter.
; {{Link/Component|DestroyCardEffectDescriptor}}
: Destroy the target card.
; {{Link/Component|DrawCardEffectDescriptor}}
: Make the target Hero draw one or more cards from their deck.
; {{Link/Component|DrawCardFromSubsetEffectDescriptor}}
: Make the target Hero {{keyword|conjure}} one or more cards from a subset.
; {{Link/Component|ExtraAttackEffectDescriptor}}
: Make the target Fighter do a Bonus Attack.
; {{Link/Component|GainSunEffectDescriptor}}
: Make the target Hero gain or lose {{icon|s}} or {{icon|b}}.
; {{Link/Component|GrantAbilityEffectDescriptor}}
: Grant an ability to the target Hero or Fighter.
; {{Link/Component|GrantTriggeredAbilityEffectDescriptor}}
: Add the effect entities of another card to the target card.
; {{Link/Component|HealEffectDescriptor}}
: Heal the target Hero or Fighter.
; {{Link/Component|MixedUpGravediggerEffectDescriptor}}
: Hide all Zombies in Gravestones and swap all Gravestones randomly. The target should be the card itself.
; {{Link/Component|ModifySunCostEffectDescriptor}}
: Modify the {{icon|s}} or {{icon|b}} cost of the target card.
; {{Link/Component|MoveCardToLanesEffectDescriptor}}
: Move the primary target (a Fighter) to the secondary target (a lane).
; {{Link/Component|ReturnToHandFromPlayEffectDescriptor}}
: {{keyword|Bounce}} the target card.
; {{Link/Component|SetStatEffectDescriptor}}
: Set the original {{icon|a}} ''or'' {{icon|h}} of the target Fighter, or increase or reduce the max {{icon|h}} of the target Hero or Fighter.
; {{Link/Component|SlowEffectDescriptor}}
: {{keyword|Freeze}} the target Fighter.
; {{Link/Component|TransformIntoCardFromSubsetEffectDescriptor}}
: Transform the target Fighter into a Fighter selected from a subset.
; {{Link/Component|TurnIntoGravestoneEffectDescriptor}}
: Hide the target Zombie in a Gravestone.
== {{msg|section title|navigation}} ==
{{Components/{{PAGELANGUAGE}} }}
[[Category:Glossary{{LS}}]]
6f1a2e4a5802076bd9ca56563055f72679dd71d9
355
353
2023-12-21T16:12:25Z
HyperNervie
2
wikitext
text/x-wiki
'''Components''' are what constitute [[Glossary#game entity|game entities]] or [[Glossary#effect entity|effect entities]]. Each component defines a subset of an entity's properties and behaviors so that an entity can be defined with a set of components.
In [[cards.json]], components are represented as objects of the following structure:
{{JSON structure/{{PAGELANGUAGE}}
|1=
* <code class="key object"></code>The component object.
** <code class="key string">$type</code>: Type of the component, formatted in <code class="str">"PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <ComponentType> component, and it is documented on an individual page named "Component/<ComponentType>" on this wiki.
** <code class="key object">$data</code>: Data of the component. Different types of components may require data objects of different structures, which are discussed in their individual pages.
|2=
{
"$type": "PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {
/* data of the component */
}
}
}}
If a component constitutes a [[Glossary#card entity|card entity]], it is a '''card entity component'''. Likewise, a component is an '''effect entity components''' if it constitutes an effect entity.
== Card entity components ==
'''Card entity components''' are components used in card entities that determine the behaviors of a card ''during gameplay''.
=== Required ===
Each card entity ''must'' have these components:
; {{Link/Component|Card}}
: Mark the game entity as a card and set its [[Glossary#GUID|GUID]].
; {{Link/Component|SunCost}}
: Set the {{icon|s}} or {{icon|b}} cost of the card.
; {{Link/Component|Rarity}}
: Set the rarity of the card.
; Either or neither of
:; {{Link/Component|Burst}}
:: Make the card Trick.
:; {{Link/Component|Environment}}
:: Make the card Environment.
: Use neither to make the card Fighter.
; One and only one of
:; {{Link/Component|BoardAbility}}
:: Make the card Board Ability.
:; {{Link/Component|Plants}}
:: Make the card belong to the Plant faction.
:; {{Link/Component|Zombies}}
:: Make the card belong to the Zombie faction.
=== Optional ===
These are optional components that can be used in the card entities of cards.json:
; {{Link/Component|Aquatic}}
: Make the Fighter {{keyword|Amphibious}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Armor}}
: Make the Fighter {{keyword|Armored}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Attack}}
: Set the {{icon|a}} of the Fighter. This can be omitted if the Fighter has no {{icon|a}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttackOverride}}
: Give the Fighter {{keyword|Health-Attack}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksInAllLanes}}
: Make the Fighter attack in all five lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksOnlyInAdjacentLanes}}
: Make the Fighter attack in its adjacent lanes instead of its own lane.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|CreateInFront}}
: When created on a lane with a Friendly Fighter, make this card in front of that Friendly Fighter. Without this component, this card will be created behind that Friendly Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Deadly}}
: Make the card {{keyword|Deadly}}.
: This ''can'' be used on Plants, Tricks and Environments despite none of them having Deadly in vanilla cards.json.
; {{Link/Component|EffectEntitiesDescriptor}}
: Define the card's effect entities (i.e. its unique abilities).
; {{Link/Component|EvolutionRestriction}}
: Decide which Fighters this Fighter can evolve on. Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Evolvable}}
: Make the Fighter evolvable on other Fighters (i.e. {{keyword|Evolution|Blahblah}}). Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Frenzy}}
: Give the Fighter {{keyword|Frenzy}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|FromBurst}}
: Purpose unconfirmed.
; [[Components/GrantedTriggeredAbilities|GrantedTriggeredAbilities]]
: Grant the effect entities of another card to this card.
; {{Link/Component|Health}}
: Set the {{icon|h}} of the Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Multishot}}
: Make the Fighter attack in its own lane and its adjacent lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|PlaysFaceDown}}
: Hide the Zombie in a {{keyword|Gravestone}} when played ''from hand''. Not to be confused with {{Link/Component|FaceDown}}.
: This ''cannot'' be used on Plants, Tricks and Environments.
; {{Link/Component|PrimarySuperpower}}
: Make the card Signature Superpower.
; {{Link/Component|ShowTriggeredIcon}}
: Change the Fighter's {{icon|a}}/{{icon|h}} icons to indicate its triggered abilities.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|SplashDamage}}
: Make the Fighter do {{keyword|Splash Damage}} to Enemy Fighters next door when it attacks.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Springboard}}
: Make other Fighters able to be played on this Fighter (i.e. {{keyword|Fusion}}).
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Strikethrough}}
: Give the Fighter {{keyword|Strikethrough}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Subtypes}}
: Set the subtypes (often referred to as "tribes" in player community) of the card.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Superpower}}
: Make the card Superpower.
; {{Link/Component|Surprise}}
: Make AI tend to reserve this card.
; {{Link/Component|Tags}}
: Set the tags of the card. Tags can't be reflected from game texts, but they do affect some interactions between cards.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Teamup}}
: Give the Fighter {{keyword|Team-Up}}.
: This ''can'' be used on Zombies despite none of them having Team-Up in vanilla cards.json.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Truestrike}}
: Give the card {{keyword|Bullseye}}.
: This ''can'' be used on Tricks and Environments despite none of them having Bullseye in vanilla cards.json.
; {{Link/Component|Untrickable}}
: Make the card {{keyword|Untrickable}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Unusable}}
: Make the card unusable during gameplay.
=== Forbidden ===
These components ''cannot'' be used in the card entities of cards.json (in another word, you can't make cards "born" with these components). Technically, some of them are general '''game entity components''' as they can be used on game entities like Heroes and lanes, while some of them are not even card entity components as they can be used only on game entities that are not card entities.
Although these are forbidden in card entities of cards.json, some of them can be applied on game entities by other means. The structures of the <code class="key">$data</code> objects of these components are unknown.
; {{Link/Component|CanPlayFighterInSurprisePhase}}
: Make the Zombie Hero able to play Zombies during their Trick phase. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|DamageImmunity}}
: Purpose unconfirmed.
; {{Link/Component|Evolved}}
: Mark that the Fighter has evolved on another Fighter,
; {{Link/Component|FaceDown}}
: Mark that the Zombie is hiding in a Gravestone. Not to be confused with {{Link/Component|PlaysFaceDown}}.
; {{Link/Component|GrassTerrain}}
: Mark the game entity as a Ground lane.
; {{Link/Component|GravestoneSpy}}
: Make the Plant Hero able to see which Zombies are hiding in Gravestones. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|Graveyard}}
: Purpose unconfirmed.
; {{Link/Component|HighgroundTerrain}}
: Mark the game entity as a Heights lane.
; {{Link/Component|Lane}}
: Mark the game entity as a lane.
; {{Link/Component|MarkedForDeath}}
: Purpose unconfirmed.
; {{Link/Component|Mustache}}
: If the Fighter doesn't belong to the Mustache subtype, attach a mustache to it. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|Player}}
: Mark the game entity as a Hero.
; {{Link/Component|Unhealable}}
: Make the Hero or Fighter unable to get healed. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|WaterTerrain}}
: Mark the game entity as a Water lane.
== Effect entity components ==
'''Effect entity components''' are components used in effect entities that determine the behaviors of an effect (i.e. a card ability). While many abilities are implemented using their dedicated components, most abilities are actually defined with effect entities within the card's {{Link/Component|EffectEntitiesDescriptor}} component. A card can have multiple effect entities at a time.
A typical effect entity consists of these components (not a universal composition):
* An {{Link/Component|EffectEntityGrouping}} component.
* A [[#Triggers|trigger component]].
* Certain [[#Filters|filter components]].
* An [[#Effect descriptors|effect descriptor component]].
=== Triggers ===
When something happens during a match, an '''event''' will be raised, then all card entities will receive it to see if its effect entities are to be triggered. '''Trigger components''' (or simply '''triggers''') decide which kind of events the effect entity gets triggered upon. Note that effect entities don't necessarily take effect when triggered - the event must pass all [[#Filters|filters]] and [[#Conditions|conditions]] of the effect entity before the effect entity truly takes effect.
The <code class="key">$type</code> strings of all triggers are formatted in <code class="str">"PvZCards.Engine.Components.<TriggerType>Trigger, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <TriggerType> trigger.
The <code class="key">$data</code> objects of all triggers are empty.
Events that trigger effect entities may or may not carry a '''trigger source''' and/or a '''trigger target'''. The source and target can be filtered using {{Link/Filter|TriggerSource}} and {{Link/Filter|TriggerTarget}} filters respectively.
; {{Link/Component|TurnStartTrigger}}
: Triggered at the start of turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|SurprisePhaseStartTrigger}}
: Triggered at the start of Zombie Tricks phase. When a Zombie is revealed from a Gravestone, it misses the SurprisePhaseStart event of this turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|RevealPhaseEndTrigger}}
: Triggered after the phase when Zombies are supposed to be revealed from Gravestones, which happens ''after'' the start of Zombie Tricks phase.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|LaneCombatStartTrigger}}
: Triggered when the combat on a lane starts.
: '''Source:''' None.
: '''Target:''' The lane where combat takes place.
; {{Link/Component|LaneCombatEndTrigger}}
: Triggered when the combat on a lane ends.
: '''Source:''' None.
: '''Target:''' The lane where combat takes place.
; {{Link/Component|CombatEndTrigger}}
: Triggered at end of turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|BuffTrigger}}
: Triggered when a Fighter gets buffed or nerfed (i.e. ±{{icon|a}}/±{{icon|h}}).
: '''Source:''' The card that buffs or nerfs the Fighter.
: '''Target:''' The buffed or nerfed Fighter.
; {{Link/Component|DamageTrigger}}
: Triggered when a Hero or Fighter gets hurt.
: '''Source:''' The card that hurts the Hero or Fighter.
: '''Target:''' The Hero or Fighter that gets hurt.
; {{Link/Component|DestroyCardTrigger}}
: Triggered when a card is destroyed.
: '''Source:''' The card that destroys the target card.
: '''Target:''' The destroyed card.
; {{Link/Component|DiscardFromPlayTrigger}}
: Triggered when a card is destroyed.
: '''Source:''' None.
: '''Target:''' The destroyed card.
; {{Link/Component|DrawCardTrigger}}
: Triggered when a Hero draws a card (including [[Conjure{{LS}}|Conjuring]]).
: '''Source:''' The card that makes the Hero draw a card.
: '''Target:''' The Hero that draws a card.
; {{Link/Component|DrawCardFromSubsetTrigger}}
: Triggered when a Hero {{keyword|conjures}} a card.
: '''Source:''' The card that makes the Hero {{keyword|conjure}} a card.
: '''Target:''' The Hero that {{keyword|conjures}} a card.
; {{Link/Component|EnterBoardTrigger}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played.
: Unlike the {{Link/Trigger|Play}} trigger, this ''excludes'' when a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The played card.
; {{Link/Component|ExtraAttackTrigger}}
: Triggered when a Fighter does a Bonus Attack.
: '''Source:''' None.
: '''Target:''' The Fighter that does a Bonus Attack.
; {{Link/Component|HealTrigger}}
: Triggered when a Hero or Fighter is healed.
: '''Source:''' None.
: '''Target:''' The Hero or Fighter that gets healed.
; {{Link/Component|MoveTrigger}}
: Triggered when a Fighter is moved.
: '''Source:''' None.
: '''Target:''' The moved Fighter.
; {{Link/Component|PlayTrigger}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played;
:* When a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The played card.
; {{Link/Component|ReturnToHandTrigger}}
: Triggered when a Fighter or Environment is [[Bounce{{LS}}|bounced]].
: '''Source:''' None.
: '''Target:''' The bounced card.
; {{Link/Component|RevealTrigger}}
: Triggered when a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The revealed Zombie.
; {{Link/Component|SlowedTrigger}}
: Triggered when a Fighter is [[Freeze{{LS}}|frozen]].
: '''Source:''' None.
: '''Target:''' The frozen Fighter.
=== Filters ===
The <code class="key">$type</code> strings of all '''filter components''' (or simply '''filters''') are formatted in <code class="str">"PvZCards.Engine.Components.<FilterType>Filter, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <FilterType> filter.
; {{Link/Component|TriggerSourceFilter}}
: If the trigger source gets filtered out by the TriggerSource filter, the effect entity will not take effect.
; {{Link/Component|TriggerTargetFilter}}
: If the trigger target gets filtered out by the TriggerTarget filter, the effect entity will not take effect.
; {{Link/Component|SelfEntityFilter}}
: If the self card<ref group="note" name="self">i.e. the card where the effect entity resides.</ref> gets filtered out by the SelfEntity filter, the effect entity will not take effect.
; {{Link/Component|PrimaryTargetFilter}}
: If a game entity gets filtered out by the PrimaryTarget filter, it will not be chosen as the primary target of the effect.
: Every effect should have a primary target. If no game entities can be chosen, the effect entity will not take effect.
; {{Link/Component|SecondaryTargetFilter}}
: If a game entity gets filtered out by the SecondaryTarget filter, it will not be chosen as the secondary target of the effect.
: Only move effect has a secondary target (which is the target lane of the moved Fighter). If no game entities can be chosen, the effect entity will not take effect.
=== Effect descriptors ===
The <code class="key">$type</code> strings of all '''effect descriptor components''' (or simply '''effect descriptors''') are formatted in <code class="str">"PvZCards.Engine.Components.<EffectDescriptorType>EffectDescriptor, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code> (except one of them being <code class="str">"PvZCards.Engine.''Effects''.GrantTriggeredAbilitiesEffectDescriptor, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>, with <code class="str">''Effects''</code> instead of <code class="str">''Components''</code> in the middle). For convenience, a component of such type can be referred to as an <EffectDescriptorType> effect descriptor.
; {{Link/Component|AttackInLaneEffectDescriptor}}
: Attack for a specified amount of damage in the target lane.
; {{Link/Component|BuffEffectDescriptor}}
: Buff the target Fighter by a specified amount. Negative amount nerfs the target Fighter.
; {{Link/Component|ChargeBlockMeterEffectDescriptor}}
: Charge the target Hero's Super Block Meter by a specified amount. Negative amount discharges the Super Block Meter.
; {{Link/Component|CopyCardEffectDescriptor}}
: Make a copy of the self card<ref group="note" name="self"/> on the target lane.
; {{Link/Component|CopyStatsEffectDescriptor}}
: Set the original {{icon|a}}/{{icon|h}} of the self Fighter<ref group="note" name="self"/> to the target Fighter's.
; {{Link/Component|CreateCardEffectDescriptor}}
: Make a specified card in the target lane.
; {{Link/Component|CreateCardFromSubsetEffectDescriptor}}
: Select a random card from a specified subset, then make it in the target lane.
; {{Link/Component|CreateCardInDeckEffectDescriptor}}
: Shuffle a specified number of copies of a specified card into the target Hero's deck.
; {{Link/Component|DamageEffectDescriptor}}
: Do a specified amount of damage to the target Hero or Fighter.
; {{Link/Component|DestroyCardEffectDescriptor}}
: Destroy the target card. ''Cannot'' destroy Board Abilities.
; {{Link/Component|DrawCardEffectDescriptor}}
: Make the target Hero draw a specified number of cards from their deck.
; {{Link/Component|DrawCardFromSubsetEffectDescriptor}}
: Make the target Hero {{keyword|conjure}} a specified number of random cards from a specified subset.
; {{Link/Component|ExtraAttackEffectDescriptor}}
: Make the target Fighter do a Bonus Attack.
; {{Link/Component|GainSunEffectDescriptor}}
: Make the target Hero gain {{icon|s}} or {{icon|b}}. Negative amount makes the target Hero lose {{icon|s}} or {{icon|b}}.
; {{Link/Component|GrantAbilityEffectDescriptor}}
: Grant an ability to the target Hero or Fighter.
; {{Link/Component|GrantTriggeredAbilityEffectDescriptor}}
: Add the effect entities of a specified card to the target card.
; {{Link/Component|HealEffectDescriptor}}
: Heal the target Hero or Fighter for a specified amount.
; {{Link/Component|MixedUpGravediggerEffectDescriptor}}
: Hide all Zombies in Gravestones and swap all Gravestones randomly. The target should be the self card<ref group="note" name="self"/>.
; {{Link/Component|ModifySunCostEffectDescriptor}}
: Modify the {{icon|s}} or {{icon|b}} cost of the target card by a specified amount.
; {{Link/Component|MoveCardToLanesEffectDescriptor}}
: Move the primary target (a Fighter) to the secondary target (a lane).
; {{Link/Component|ReturnToHandFromPlayEffectDescriptor}}
: {{keyword|Bounce}} the target card.
; {{Link/Component|SetStatEffectDescriptor}}
: Set the original {{icon|a}} or {{icon|h}} of the target Fighter to a specified amount, or modify the max {{icon|h}} of the target Hero by a specified amount.
; {{Link/Component|SlowEffectDescriptor}}
: {{keyword|Freeze}} the target Fighter.
; {{Link/Component|TransformIntoCardFromSubsetEffectDescriptor}}
: Transform the target Fighter into a random Fighter selected from a subset.
; {{Link/Component|TurnIntoGravestoneEffectDescriptor}}
: Hide the target Zombie in a Gravestone.
=== Multipliers ===
'''Multiplier components''' (or simply '''multipliers''') multiply the effect values by a certain amount. They also support using dividers that cut down the effect values. The <code class="key">$type</code> strings of all multiplier components are formatted in <code class="str">"PvZCards.Engine.Components.<MultiplierType>Multiplier, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <MultiplierType> multiplier.
Multipliers work only on <code class="key"><Blahblah>Amount</code> fields of effect descriptors. Effect descriptors with such fields are: {{Link/EffectDescriptor|AttackInLane}}, {{Link/EffectDescriptor|Buff}}, {{Link/EffectDescriptor|ChargeBlockMeter}}, {{Link/EffectDescriptor|Damage}}, {{Link/EffectDescriptor|DrawCard}}, {{Link/EffectDescriptor|DrawCardFromSubset}}, {{Link/EffectDescriptor|Heal}} and {{Link/EffectDescriptor|ModifySunCost}}.
; {{Link/Component|DrawnCardCostMultiplier}}
: Must be used together with the {{Link/Trigger|DrawCard}} or {{Link/Trigger|DrawCardFromSubset}} trigger.
: Multiply the effect value by the {{icon|s}} or {{icon|b}} cost of the card drawn.
; {{Link/Component|HeroHealthMultiplier}}
: Multiply the effect value by the {{icon|h}} of the Hero of a specified faction.
; {{Link/Component|QueryMultiplier}}
: Multiply the effect value by the number of game entities that pass a specified [[Query{{LS}}|query]].
; {{Link/Component|SunGainedMultiplier}}
: Multiply the effect value by how many {{icon|s}} or {{icon|b}} the Hero of a specified faction gains this turn.
; {{Link/Component|TargetAttackMultiplier}}
: Multiply the effect value by the {{icon|a}} of the effect target.
; {{Link/Component|TargetAttackOrHealthMultiplier}}
: Must be used together with the {{Link/EffectDescriptor|Buff}} effect descriptor.
: Multiply the <code class="key">AttackAmount</code> and the <code class="key">HealthAmount</code> of Buff effect descriptor by the {{icon|a}} and {{icon|h}} of the effect target ''respectively''.
; {{Link/Component|TargetHealthMultiplier}}
: Multiply the effect value by the {{icon|h}} of the effect target.
== Footnotes ==
<references group="note"/>
== {{msg|section title|navigation}} ==
{{Components/{{PAGELANGUAGE}} }}
[[Category:Glossary{{LS}}]]
23e48800f66af526a7d962f496f0b74827b92220
356
355
2023-12-22T08:41:32Z
HyperNervie
2
Conditions and others
wikitext
text/x-wiki
'''Components''' are what constitute [[Glossary#game entity|game entities]] or [[Glossary#effect entity|effect entities]]. Each component defines a subset of an entity's properties and behaviors so that an entity can be defined with a set of components.
In [[cards.json]], components are represented as objects of the following structure:
{{JSON structure/{{PAGELANGUAGE}}
|1=
* <code class="key object"></code>The component object.
** <code class="key string">$type</code>: Type of the component, formatted in <code class="str">"PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <ComponentType> component, and it is documented on an individual page named "Component/<ComponentType>" on this wiki.
** <code class="key object">$data</code>: Data of the component. Different types of components may require data objects of different structures, which are discussed in their individual pages.
|2=
{
"$type": "PvZCards.Engine.Components.<ComponentType>, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {
/* data of the component */
}
}
}}
If a component constitutes a [[Glossary#card entity|card entity]], it is a '''card entity component'''. Likewise, a component is an '''effect entity components''' if it constitutes an effect entity.
== Card entity components ==
'''Card entity components''' are components used in card entities that determine the behaviors of a card ''during gameplay''.
=== Required ===
Each card entity ''must'' have these components:
; {{Link/Component|Card}}
: Mark the game entity as a card and set its [[Glossary#GUID|GUID]].
; {{Link/Component|SunCost}}
: Set the {{icon|s}} or {{icon|b}} cost of the card.
; {{Link/Component|Rarity}}
: Set the rarity of the card.
; Either or neither of
:; {{Link/Component|Burst}}
:: Make the card Trick.
:; {{Link/Component|Environment}}
:: Make the card Environment.
: Use neither to make the card Fighter.
; One and only one of
:; {{Link/Component|BoardAbility}}
:: Make the card Board Ability.
:; {{Link/Component|Plants}}
:: Make the card belong to the Plant faction.
:; {{Link/Component|Zombies}}
:: Make the card belong to the Zombie faction.
=== Optional ===
These are optional components that can be used in the card entities of cards.json:
; {{Link/Component|Aquatic}}
: Make the Fighter {{keyword|Amphibious}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Armor}}
: Make the Fighter {{keyword|Armored}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Attack}}
: Set the {{icon|a}} of the Fighter. This can be omitted if the Fighter has no {{icon|a}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttackOverride}}
: Give the Fighter {{keyword|Health-Attack}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksInAllLanes}}
: Make the Fighter attack in all five lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|AttacksOnlyInAdjacentLanes}}
: Make the Fighter attack in its adjacent lanes instead of its own lane.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|CreateInFront}}
: When created on a lane with a Friendly Fighter, make this card in front of that Friendly Fighter. Without this component, this card will be created behind that Friendly Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Deadly}}
: Make the card {{keyword|Deadly}}.
: This ''can'' be used on Plants, Tricks and Environments despite none of them having Deadly in vanilla cards.json.
; {{Link/Component|EffectEntitiesDescriptor}}
: Define the card's effect entities (i.e. its unique abilities).
; {{Link/Component|EvolutionRestriction}}
: Decide which Fighters this Fighter can evolve on. Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Evolvable}}
: Make the Fighter evolvable on other Fighters (i.e. {{keyword|Evolution|Blahblah}}). Must be used together with the Evolvable component.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Frenzy}}
: Give the Fighter {{keyword|Frenzy}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|FromBurst}}
: Purpose unconfirmed.
; [[Components/GrantedTriggeredAbilities|GrantedTriggeredAbilities]]
: Grant the effect entities of another card to this card.
; {{Link/Component|Health}}
: Set the {{icon|h}} of the Fighter.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Multishot}}
: Make the Fighter attack in its own lane and its adjacent lanes.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|PlaysFaceDown}}
: Hide the Zombie in a {{keyword|Gravestone}} when played ''from hand''. Not to be confused with {{Link/Component|FaceDown}}.
: This ''cannot'' be used on Plants, Tricks and Environments.
; {{Link/Component|PrimarySuperpower}}
: Make the card Signature Superpower.
; {{Link/Component|ShowTriggeredIcon}}
: Change the Fighter's {{icon|a}}/{{icon|h}} icons to indicate its triggered abilities.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|SplashDamage}}
: Make the Fighter do {{keyword|Splash Damage}} to Enemy Fighters next door when it attacks.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Springboard}}
: Make other Fighters able to be played on this Fighter (i.e. {{keyword|Fusion}}).
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Strikethrough}}
: Give the Fighter {{keyword|Strikethrough}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Subtypes}}
: Set the subtypes (often referred to as "tribes" in player community) of the card.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Superpower}}
: Make the card Superpower.
; {{Link/Component|Surprise}}
: Make AI tend to reserve this card.
; {{Link/Component|Tags}}
: Set the tags of the card. Tags can't be reflected from game texts, but they do affect some interactions between cards.
: This can be omitted if the card has no subtypes.
; {{Link/Component|Teamup}}
: Give the Fighter {{keyword|Team-Up}}.
: This ''can'' be used on Zombies despite none of them having Team-Up in vanilla cards.json.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Truestrike}}
: Give the card {{keyword|Bullseye}}.
: This ''can'' be used on Tricks and Environments despite none of them having Bullseye in vanilla cards.json.
; {{Link/Component|Untrickable}}
: Make the card {{keyword|Untrickable}}.
: This ''cannot'' be used on Tricks and Environments.
; {{Link/Component|Unusable}}
: Make the card unusable during gameplay.
=== Forbidden ===
These components ''cannot'' be used in the card entities of cards.json (in another word, you can't make cards "born" with these components). Technically, some of them are general '''game entity components''' as they can be used on game entities like Heroes and lanes, while some of them are not even card entity components as they can be used only on game entities that are not card entities.
Although these are forbidden in card entities of cards.json, some of them can be applied on game entities by other means. The structures of the <code class="key">$data</code> objects of these components are unknown.
; {{Link/Component|CanPlayFighterInSurprisePhase}}
: Make the Zombie Hero able to play Zombies during their Trick phase. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|DamageImmunity}}
: Purpose unconfirmed.
; {{Link/Component|Evolved}}
: Mark that the Fighter has evolved on another Fighter,
; {{Link/Component|FaceDown}}
: Mark that the Zombie is hiding in a Gravestone. Not to be confused with {{Link/Component|PlaysFaceDown}}.
; {{Link/Component|GrassTerrain}}
: Mark the game entity as a Ground lane.
; {{Link/Component|GravestoneSpy}}
: Make the Plant Hero able to see which Zombies are hiding in Gravestones. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
: This makes no difference on other game entities.
; {{Link/Component|Graveyard}}
: Purpose unconfirmed.
; {{Link/Component|HighgroundTerrain}}
: Mark the game entity as a Heights lane.
; {{Link/Component|Lane}}
: Mark the game entity as a lane.
; {{Link/Component|MarkedForDeath}}
: Purpose unconfirmed.
; {{Link/Component|Mustache}}
: If the Fighter doesn't belong to the Mustache subtype, attach a mustache to it. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|Player}}
: Mark the game entity as a Hero.
; {{Link/Component|Unhealable}}
: Make the Hero or Fighter unable to get healed. Can be granted by the [[Component/GrantAbilityEffectDescriptor|GrantAbility]] effect descriptor.
; {{Link/Component|WaterTerrain}}
: Mark the game entity as a Water lane.
== Effect entity components ==
'''Effect entity components''' are components used in effect entities that determine the behaviors of an effect (i.e. a card ability). While many abilities are implemented using their dedicated components, most abilities are actually defined with effect entities within the card's {{Link/Component|EffectEntitiesDescriptor}} component. A card can have multiple effect entities at a time.
A typical effect entity consists of these components (not a universal composition):
* An {{Link/Component|EffectEntityGrouping}} component.
* A [[#Triggers|trigger component]].
* Certain [[#Filters|filter components]].
* An [[#Effect descriptors|effect descriptor component]].
=== Triggers ===
When something happens during a match, an '''event''' will be raised, then all card entities will receive it to see if its effect entities are to be triggered. '''Trigger components''' (or simply '''triggers''') decide which kind of events the effect entity gets triggered upon. Note that effect entities don't necessarily take effect when triggered - the event must pass all [[#Filters|filters]] and [[#Conditions|conditions]] of the effect entity before the effect entity truly takes effect.
The <code class="key">$type</code> strings of all triggers are formatted in <code class="str">"PvZCards.Engine.Components.<TriggerType>Trigger, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <TriggerType> trigger.
The <code class="key">$data</code> objects of all triggers are empty.
Except aura effects<ref group="note">Effects that wear off when thair source cards are gone. See {{Link/Component|ActiveTargets}} and {{Link/Component|Continuous}} components for more.</ref>, herald effects<ref group="note">Effects that apply to [[Conjure{{LS}}|Conjured]] cards. See {{Link/Component|HeraldEntities}} component for more.</ref> and damage redirector effects<ref group="note" name="damageredirect">Effects that redirect damage to another game entity. See {{Link/Component|DamageEffectRedirector}} and {{Link/Component|DamageEffectRedirectorDescriptor}} components for more.</ref>, every effect entity must have a trigger.
Events that trigger effect entities may or may not carry a '''trigger source''' and/or a '''trigger target'''. The source and target can be filtered using {{Link/Filter|TriggerSource}} and {{Link/Filter|TriggerTarget}} filters respectively.
; {{Link/Component|TurnStartTrigger}}
: Triggered at the start of turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|SurprisePhaseStartTrigger}}
: Triggered at the start of Zombie Tricks phase. When a Zombie is revealed from a Gravestone, it misses the SurprisePhaseStart event of this turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|RevealPhaseEndTrigger}}
: Triggered after the phase when Zombies are supposed to be revealed from Gravestones, which happens ''after'' the start of Zombie Tricks phase.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|LaneCombatStartTrigger}}
: Triggered when the combat on a lane starts.
: '''Source:''' None.
: '''Target:''' The lane where combat takes place.
; {{Link/Component|LaneCombatEndTrigger}}
: Triggered when the combat on a lane ends.
: '''Source:''' None.
: '''Target:''' The lane where combat takes place.
; {{Link/Component|CombatEndTrigger}}
: Triggered at end of turn.
: '''Source:''' None.
: '''Target:''' None.
; {{Link/Component|BuffTrigger}}
: Triggered when a Fighter gets buffed or nerfed (i.e. ±{{icon|a}}/±{{icon|h}}).
: '''Source:''' The card that buffs or nerfs the Fighter.
: '''Target:''' The buffed or nerfed Fighter.
; {{Link/Component|DamageTrigger}}
: Triggered when a Hero or Fighter gets hurt.
: '''Source:''' The card that hurts the Hero or Fighter.
: '''Target:''' The Hero or Fighter that gets hurt.
; {{Link/Component|DestroyCardTrigger}}
: Triggered when a card is destroyed.
: '''Source:''' The card that destroys the target card.
: '''Target:''' The destroyed card.
; {{Link/Component|DiscardFromPlayTrigger}}
: Triggered when a card is destroyed.
: '''Source:''' None.
: '''Target:''' The destroyed card.
; {{Link/Component|DrawCardTrigger}}
: Triggered when a Hero draws a card (including [[Conjure{{LS}}|Conjuring]]).
: '''Source:''' The card that makes the Hero draw a card.
: '''Target:''' The Hero that draws a card.
; {{Link/Component|DrawCardFromSubsetTrigger}}
: Triggered when a Hero {{keyword|conjures}} a card.
: '''Source:''' The card that makes the Hero {{keyword|conjure}} a card.
: '''Target:''' The Hero that {{keyword|conjures}} a card.
; {{Link/Component|EnterBoardTrigger}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played.
: Unlike the {{Link/Trigger|Play}} trigger, this ''excludes'' when a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The played card.
; {{Link/Component|ExtraAttackTrigger}}
: Triggered when a Fighter does a Bonus Attack.
: '''Source:''' None.
: '''Target:''' The Fighter that does a Bonus Attack.
; {{Link/Component|HealTrigger}}
: Triggered when a Hero or Fighter is healed.
: '''Source:''' None.
: '''Target:''' The Hero or Fighter that gets healed.
; {{Link/Component|MoveTrigger}}
: Triggered when a Fighter is moved.
: '''Source:''' None.
: '''Target:''' The moved Fighter.
; {{Link/Component|PlayTrigger}}
: Triggered when a card is played. This includes:
:* When a card is played from hand;
:* When a card is made by effects of other cards;
:* When a Fighter transforms into a new one;
:* When a Gravestone is played;
:* When a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The played card.
; {{Link/Component|ReturnToHandTrigger}}
: Triggered when a Fighter or Environment is [[Bounce{{LS}}|bounced]].
: '''Source:''' None.
: '''Target:''' The bounced card.
; {{Link/Component|RevealTrigger}}
: Triggered when a Zombie is revealed from a Gravestone.
: '''Source:''' None.
: '''Target:''' The revealed Zombie.
; {{Link/Component|SlowedTrigger}}
: Triggered when a Fighter is [[Freeze{{LS}}|frozen]].
: '''Source:''' None.
: '''Target:''' The frozen Fighter.
=== Filters ===
The <code class="key">$type</code> strings of all '''filter components''' (or simply '''filters''') are formatted in <code class="str">"PvZCards.Engine.Components.<FilterType>Filter, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <FilterType> filter.
; {{Link/Component|TriggerSourceFilter}}
: If the trigger source gets filtered out by the TriggerSource filter, the effect entity will not take effect.
; {{Link/Component|TriggerTargetFilter}}
: If the trigger target gets filtered out by the TriggerTarget filter, the effect entity will not take effect.
; {{Link/Component|SelfEntityFilter}}
: If the self card<ref group="note" name="self">The card that bears the effect entity.</ref> gets filtered out by the SelfEntity filter, the effect entity will not take effect.
; {{Link/Component|PrimaryTargetFilter}}
: If a game entity gets filtered out by the PrimaryTarget filter, it will not be chosen as the primary target of the effect.
: Every effect should have a primary target. If no game entities can be chosen, the effect entity will not take effect.
; {{Link/Component|SecondaryTargetFilter}}
: If a game entity gets filtered out by the SecondaryTarget filter, it will not be chosen as the secondary target of the effect.
: Only move effect has a secondary target (which is the target lane of the moved Fighter). If no game entities can be chosen, the effect entity will not take effect.
=== Effect descriptors ===
The <code class="key">$type</code> strings of all '''effect descriptor components''' (or simply '''effect descriptors''') are formatted in <code class="str">"PvZCards.Engine.Components.<EffectDescriptorType>EffectDescriptor, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code> (except one of them being <code class="str">"PvZCards.Engine.''Effects''.GrantTriggeredAbilitiesEffectDescriptor, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>, with <code class="str">''Effects''</code> instead of <code class="str">''Components''</code> in the middle). For convenience, a component of such type can be referred to as an <EffectDescriptorType> effect descriptor.
Except damage redirector effects<ref group="note" name="damageredirect"/>, every effect entity must have an effect descriptor.
; {{Link/Component|AttackInLaneEffectDescriptor}}
: Attack for a specified amount of damage in the target lane.
; {{Link/Component|BuffEffectDescriptor}}
: Buff the target Fighter by a specified amount. Negative amount nerfs the target Fighter.
; {{Link/Component|ChargeBlockMeterEffectDescriptor}}
: Charge the target Hero's Super Block Meter by a specified amount. Negative amount discharges the Super Block Meter.
; {{Link/Component|CopyCardEffectDescriptor}}
: Make a copy of the self card<ref group="note" name="self"/> on the target lane.
; {{Link/Component|CopyStatsEffectDescriptor}}
: Set the original {{icon|a}}/{{icon|h}} of the self Fighter<ref group="note" name="self"/> to the target Fighter's.
; {{Link/Component|CreateCardEffectDescriptor}}
: Make a specified card in the target lane.
; {{Link/Component|CreateCardFromSubsetEffectDescriptor}}
: Select a random card from a specified subset, then make it in the target lane.
; {{Link/Component|CreateCardInDeckEffectDescriptor}}
: Shuffle a specified number of copies of a specified card into the target Hero's deck.
; {{Link/Component|DamageEffectDescriptor}}
: Do a specified amount of damage to the target Hero or Fighter.
; {{Link/Component|DestroyCardEffectDescriptor}}
: Destroy the target card. ''Cannot'' destroy Board Abilities.
; {{Link/Component|DrawCardEffectDescriptor}}
: Make the target Hero draw a specified number of cards from their deck.
; {{Link/Component|DrawCardFromSubsetEffectDescriptor}}
: Make the target Hero {{keyword|conjure}} a specified number of random cards from a specified subset.
; {{Link/Component|ExtraAttackEffectDescriptor}}
: Make the target Fighter do a Bonus Attack.
; {{Link/Component|GainSunEffectDescriptor}}
: Make the target Hero gain {{icon|s}} or {{icon|b}}. Negative amount makes the target Hero lose {{icon|s}} or {{icon|b}}.
; {{Link/Component|GrantAbilityEffectDescriptor}}
: Grant an ability to the target Hero or Fighter.
; {{Link/Component|GrantTriggeredAbilityEffectDescriptor}}
: Add the effect entities of a specified card to the target card.
; {{Link/Component|HealEffectDescriptor}}
: Heal the target Hero or Fighter for a specified amount.
; {{Link/Component|MixedUpGravediggerEffectDescriptor}}
: Hide all Zombies in Gravestones and swap all Gravestones randomly. The target should be the self card<ref group="note" name="self"/>.
; {{Link/Component|ModifySunCostEffectDescriptor}}
: Modify the {{icon|s}} or {{icon|b}} cost of the target card by a specified amount.
; {{Link/Component|MoveCardToLanesEffectDescriptor}}
: Move the primary target (a Fighter) to the secondary target (a lane).
; {{Link/Component|ReturnToHandFromPlayEffectDescriptor}}
: {{keyword|Bounce}} the target card.
; {{Link/Component|SetStatEffectDescriptor}}
: Set the original {{icon|a}} or {{icon|h}} of the target Fighter to a specified amount, or modify the max {{icon|h}} of the target Hero by a specified amount.
; {{Link/Component|SlowEffectDescriptor}}
: {{keyword|Freeze}} the target Fighter.
; {{Link/Component|TransformIntoCardFromSubsetEffectDescriptor}}
: Transform the target Fighter into a random Fighter selected from a subset.
; {{Link/Component|TurnIntoGravestoneEffectDescriptor}}
: Hide the target Zombie in a Gravestone.
=== Multipliers ===
'''Multiplier components''' (or simply '''multipliers''') multiply the effect values by a certain amount. They also support using dividers that cut down the effect values.
The <code class="key">$type</code> strings of all multiplier components are formatted in <code class="str">"PvZCards.Engine.Components.<MultiplierType>Multiplier, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <MultiplierType> multiplier.
Multipliers work only on <code class="key"><Blahblah>Amount</code> fields of effect descriptors. Effect descriptors with such fields are: {{Link/EffectDescriptor|AttackInLane}}, {{Link/EffectDescriptor|Buff}}, {{Link/EffectDescriptor|ChargeBlockMeter}}, {{Link/EffectDescriptor|Damage}}, {{Link/EffectDescriptor|DrawCard}}, {{Link/EffectDescriptor|DrawCardFromSubset}}, {{Link/EffectDescriptor|Heal}} and {{Link/EffectDescriptor|ModifySunCost}}.
All multipliers are optional.
; {{Link/Component|DrawnCardCostMultiplier}}
: Must be used together with the {{Link/Trigger|DrawCard}} or {{Link/Trigger|DrawCardFromSubset}} trigger.
: Multiply the effect value by the {{icon|s}} or {{icon|b}} cost of the card drawn.
; {{Link/Component|HeroHealthMultiplier}}
: Multiply the effect value by the {{icon|h}} of the Hero of a specified faction.
; {{Link/Component|QueryMultiplier}}
: Multiply the effect value by the number of game entities that pass a specified [[Query{{LS}}|query]].
; {{Link/Component|SunGainedMultiplier}}
: Multiply the effect value by how many {{icon|s}} or {{icon|b}} the Hero of a specified faction gains this turn.
; {{Link/Component|TargetAttackMultiplier}}
: Multiply the effect value by the {{icon|a}} of the effect target.
; {{Link/Component|TargetAttackOrHealthMultiplier}}
: Must be used together with the {{Link/EffectDescriptor|Buff}} effect descriptor.
: Multiply the <code class="key">AttackAmount</code> and the <code class="key">HealthAmount</code> of Buff effect descriptor by the {{icon|a}} and {{icon|h}} of the effect target ''respectively''.
; {{Link/Component|TargetHealthMultiplier}}
: Multiply the effect value by the {{icon|h}} of the effect target.
=== Conditions ===
'''Condition components''' (or simply '''conditions''') furthermore specify the conditions that should be met before effect entities take effect.
The <code class="key">$type</code> strings of all condition components are formatted in <code class="str">"PvZCards.Engine.Components.<ConditionType>Condition, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"</code>. For convenience, a component of such type can be referred to as a <ConditionType> condition.
All conditions are optional.
; {{Link/Component|EffectValueCondition}}
: If the effect value of the trigger event doesn't pass a specified comparison, the effect entity will not take effect.
; {{Link/Component|OncePerGameCondition}}
: If the effect entity has already taken effect once this game, the effect entity will not take effect for a second time.
; {{Link/Component|OncePerTurnCondition}}
: If the effect entity has already taken effect once this turn, the effect entity will not take effect for a second time this turn.
; {{Link/Component|PlayerInfoCondition}}
: If the Hero of a specified faction doesn't meet a specified requirement, the effect entity will not take effect.
; {{Link/Component|QueryEntityCondition}}
: Find game entities that meet a specified requirement first, then check if any or all of them meet another specified requirement. If no, the effect entity will not take effect.
=== Others ===
These effect entity components don't belong to any of the categories above.
; {{Link/Component|ActiveTargets}}
: Make the effect persist as long as its source card is present. Use this component and the {{Link/Component|Continuous}} component to make an aura effect.
; {{Link/Component|Continuous}}
: Make the effect live without using triggers. Use this component and the {{Link/Component|ActiveTargets}} component to make an aura effect.
; {{Link/Component|DamageEffectRedirector}}
: Redirect damage from the trigger target. Must be used together with the DamageEffectRedirectorDescriptor component.
: Its trigger target, which is the Hero or Fighter that would get hurt, can be filtered using the {{Link/Filter|TriggerTarget}} filter.
; {{Link/Component|DamageEffectRedirectorDescriptor}}
: Redirect damage to the effect target. Must be used together with the DamageEffectRedirector component.
: Its effect target, which is the Hero or Fighter that damage will be redirected to, can be filtered using the {{Link/Filter|PrimaryTarget}} filter.
; {{Link/Component|EffectEntityGrouping}}
: Categorize the entity into a group. Its purpose is yet to be confirmed.
; {{Link/Component|EffectValueDescriptor}}
: Map a certain value to the effect value of the effect descriptor.
; {{Link/Component|HeraldEntities}}
: After the effect makes a Hero {{keyword|Conjure}} a card, apply the specified effect entities to that card. Must be used together with the {{Link/EffectDescriptor|DrawCardFromSubset}} effect descriptor.
; {{Link/Component|PersistsAfterTransform}}
: Keep this effect entity after the self card<ref group="note" name="self"/> gets transformed.
; {{Link/Component|TransformWithCreationSource}}
: Mark the source of the effect's transform target. Must be used together with the {{Link/EffectDescriptor|TransformIntoCardFromSubset}} effect descriptor.
== Footnotes ==
<references group="note"/>
== {{msg|section title|navigation}} ==
{{Components/{{PAGELANGUAGE}} }}
[[Category:Glossary{{LS}}]]
ac54dca31d5774d777d0f11d8fb5fa633cbc61df
MediaWiki:Edittools
8
2
354
244
2023-12-21T16:03:43Z
HyperNervie
2
wikitext
text/x-wiki
<div id="mw-edittools-charinsert" class="mw-charinsert-buttons" title="Click on the wanted special character.">
<p class="mw-edittools-section" data-section-title="Standard">
'''General:'''
<charinsert label="\t">	</charinsert> •
<charinsert><nowiki><!-- + --></nowiki></charinsert> •
<charinsert><code class="key">+</code></charinsert> •
<charinsert><nowiki>+</nowiki></charinsert> •
<charinsert><nowiki>{{</nowiki>msg|+|}}</charinsert> •
<charinsert><nowiki>{{</nowiki>icon|+}}</charinsert> •
<charinsert><nowiki>{{</nowiki>keyword|+}}</charinsert> •
<charinsert><nowiki>{{</nowiki>Link/+|}}</charinsert>
<br>
'''Escape characters:'''
<charinsert><nowiki>{{</nowiki>\n}}</charinsert> •
<charinsert><nowiki>{{</nowiki>((}}</charinsert> •
<charinsert><nowiki>{{</nowiki>))}}</charinsert>
<br>
'''Templates:'''
<charinsert><includeonly>+</includeonly></charinsert> •
<charinsert><noinclude>+</noinclude></charinsert> •
<charinsert><nowiki>{{</nowiki>Documentation}}</charinsert>
<br>
'''Translations:'''
<charinsert><languages/></charinsert> •
<charinsert><translate>+</translate></charinsert> •
<charinsert><tvar name=>+</tvar></charinsert> •
<charinsert>/<nowiki>{{</nowiki>PAGELANGUAGE}}</charinsert> •
<charinsert><nowiki>{{</nowiki>LS}}</charinsert>
</p>
</div>
4e3c7bda87eec56d658052b27b4cc589cde995aa
Template:JSON structure
10
123
357
337
2023-12-22T08:45:38Z
HyperNervie
2
wikitext
text/x-wiki
<includeonly><tabber>
|-|<translate><!--T:1--> Treeview</translate>=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code><translate><!--T:2--> The <tvar name=1><code class="key">$data</code></tvar> object of the component.</translate>}}{{#if: {{{query|}}} |* <code class="key object"></code><translate><!--T:3--> The <tvar name=1><code class="key">$data</code></tvar> object of the query.</translate>}}{{{1}}}
</div>
|-|<translate><!--T:4--> Source</translate>=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | {{#ifeq: {{{component}}} | GrantTriggeredAbilityEffectDescriptor | Effects | Components }}.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
70afc7a7c39285ba7f1ec8527e13f03675b9bf7b
Template:JSON structure/zh-hans
10
128
358
338
2023-12-22T08:46:14Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<includeonly><tabber>
|-|树形图=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code>组件的<code class="key">$data</code>对象。}}{{#if: {{{query|}}} |* <code class="key object"></code>问询的<code class="key">$data</code>对象。}}{{{1}}}
</div>
|-|源代码=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | {{#ifeq: {{{component}}} | GrantTriggeredAbilityEffectDescriptor | Effects | Components }}.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
ffcb821ca38918be7d3c50c25c1d11991315c611
Template:JSON structure/en
10
133
359
339
2023-12-22T08:46:14Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<includeonly><tabber>
|-|Treeview=
<div class="treeview">
{{#if: {{{component|}}} |* <code class="key object"></code>The <code class="key">$data</code> object of the component.}}{{#if: {{{query|}}} |* <code class="key object"></code>The <code class="key">$data</code> object of the query.}}{{{1}}}
</div>
|-|Source=
{{#tag:syntaxhighlight|
{{#if: {{{component|}}}{{{query|}}} |
{
"$type": "PvZCards.Engine.{{#if: {{{component|}}} | {{#ifeq: {{{component}}} | GrantTriggeredAbilityEffectDescriptor | Effects | Components }}.{{{component}}} }}{{#if: {{{query|}}} | Queries.{{{query}}}Query }}, EngineLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null",
"$data": {{{2}}}
}
| {{{2}}} }}
|lang=json}}
</tabber></includeonly><noinclude><languages/>
{{Documentation}}</noinclude>
e2f84e9df70249fbeec63b439fa643cef1730587
Component/Card
0
9
360
341
2023-12-22T08:47:30Z
HyperNervie
2
wikitext
text/x-wiki
<languages/>
<translate><tvar name=1><code class="str">PvZCards.Engine.Components.Card</code></tvar> is a [[<tvar name=2>Component{{LS}}#Card entity components</tvar>|card entity component]] that identifies the <tvar name=3>[[Glossary{{LS}}#GUID|GUID]]</tvar> of a card. Each card must have this component in their card entity.</translate>
== {{msg|section title|json-structure}} ==
{{JSON structure/{{PAGELANGUAGE}}|component=Card
|1=<nowiki/>
** <code class="key number">Guid</code>: The card's GUID. Must match the key that the card definition object in [[cards.json]] is associated with.
|2={
"Guid": /* <translate>a positive integer</translate> */
}
}}
== {{msg|section title|see-also}} ==
* <translate><tvar name=1>{{Link/Component|Player}}</tvar> component - marks the game entity as a Hero,</translate>
* <translate><tvar name=1>{{Link/Component|Lane}}</tvar> component - marks the game entity as a lane.</translate>
== {{msg|section title|navigation}} ==
{{Components/{{PAGELANGUAGE}}|state2=collapsed}}
[[Category:Card entity component{{LS}}]]
2611d4d0a819e3f5829d47fd18b4d408c324575d
Template:Message/section title
10
136
361
230
2023-12-22T08:50:47Z
HyperNervie
2
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=<translate><!--T:1--> Details</translate>
|examples=<translate>Examples</translate>
|footnotes=<translate>Footnotes</translate>
|json-structure=<translate><!--T:2--> JSON structure</translate>
|navigation=<translate><!--T:3--> Navigation</translate>
|references=<translate>References</translate>
|see-also=<translate><!--T:4--> See also</translate>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
80e33721361a0ab5793cc70b45811f649187ef74
362
361
2023-12-22T08:51:29Z
HyperNervie
2
Marked this version for translation
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=<translate><!--T:1--> Details</translate>
|examples=<translate><!--T:5--> Examples</translate>
|footnotes=<translate><!--T:6--> Footnotes</translate>
|json-structure=<translate><!--T:2--> JSON structure</translate>
|navigation=<translate><!--T:3--> Navigation</translate>
|references=<translate><!--T:7--> References</translate>
|see-also=<translate><!--T:4--> See also</translate>
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
5b29d411ff531ba18794368ad8ea8482668c467b
Translations:Template:Message/section title/5/en
1198
213
363
2023-12-22T08:51:34Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Examples
eb01bf04c9a0e8a71c45816513df424f1c7ffedb
Translations:Template:Message/section title/6/en
1198
214
364
2023-12-22T08:51:35Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
Footnotes
ec0c3b76630fd745381cc215a284820af75a683a
Translations:Template:Message/section title/7/en
1198
215
365
2023-12-22T08:51:35Z
FuzzyBot
13
Importing a new version from external source
wikitext
text/x-wiki
References
5d20d0fee3b91643dd8d272ac33d01ca95179d82
Template:Message/section title/en
10
141
366
235
2023-12-22T08:51:57Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=Details
|examples=Examples
|footnotes=Footnotes
|json-structure=JSON structure
|navigation=Navigation
|references=References
|see-also=See also
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
902e98228ab870ee37010db90d72d1f10161aa79
Template:Message/section title/zh-hans
10
143
367
243
2023-12-22T08:51:58Z
FuzzyBot
13
Updating to match new version of source page
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=细节
|examples=<span lang="en" dir="ltr" class="mw-content-ltr">Examples</span>
|footnotes=<span lang="en" dir="ltr" class="mw-content-ltr">Footnotes</span>
|json-structure=JSON结构
|navigation=导航
|references=<span lang="en" dir="ltr" class="mw-content-ltr">References</span>
|see-also=另见
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
41d863d898e78acfbe95a6df20d0debdfe4f61a8
370
367
2023-12-22T08:53:09Z
HyperNervie
2
Created page with "示例"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=细节
|examples=示例
|footnotes=注释
|json-structure=JSON结构
|navigation=导航
|references=<span lang="en" dir="ltr" class="mw-content-ltr">References</span>
|see-also=另见
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
12d94043699f1386ea1ccc51cafbe14c9442b903
372
370
2023-12-22T08:53:42Z
HyperNervie
2
Created page with "参考资料"
wikitext
text/x-wiki
<includeonly>{{#invoke:Message|getMsg|1=section title
|details=细节
|examples=示例
|footnotes=注释
|json-structure=JSON结构
|navigation=导航
|references=参考资料
|see-also=另见
}}</includeonly><noinclude><languages/>
{{Documentation|content={{ {{PAGENAME}} |showTable=yes}} }}
</noinclude>
cfe02219268d97f90cfca91cd052dd0235b0bd3a
Translations:Template:Message/section title/5/zh-hans
1198
216
368
2023-12-22T08:52:59Z
HyperNervie
2
Created page with "示例"
wikitext
text/x-wiki
示例
30fd4ed55b4fbdfb518591a12298229486f8ec7f
Translations:Template:Message/section title/6/zh-hans
1198
217
369
2023-12-22T08:53:04Z
HyperNervie
2
Created page with "注释"
wikitext
text/x-wiki
注释
4d8de83d62753261886e9b4b775fd58e70c9acaf
Translations:Template:Message/section title/7/zh-hans
1198
218
371
2023-12-22T08:53:35Z
HyperNervie
2
Created page with "参考资料"
wikitext
text/x-wiki
参考资料
54709db3b7dc72367e4b8cd9d5b53a17b8d36127
Cards.json
0
8
373
109
2023-12-22T09:11:42Z
HyperNervie
2
wikitext
text/x-wiki
'''cards.json''' is where stats and abilities of cards are defined. By editing this file, cards may behave differently during gameplay.
On the Android version, cards.json is located in the <code>Android/data/com.ea.gp.pvzheroes/files/cache/bundles/files/cards/card_data_172</code> bundle.
== {{msg|section title|json-structure}} ==
cards.json notates an object that holds the definition of all cards of the game. The object uses card [[Glossary#GUID|GUIDs]] as keys, and the values are '''card definition objects''' that define cards with corresponding GUIDs.
<syntaxhighlight lang="json">
{
"1": {
/* Definition object of card #1 */
},
"2": {
/* Definition object of card #2 */
},
"3": {
/* Definition object of card #3 */
},
/* And so on... */
}
</syntaxhighlight>
Card definition objects hold the following structure:
{{JSON structure/{{PAGELANGUAGE}}
|1=
* <code class="key object"></code>The card definition object.
** <code class="key object">entity</code>: A card entity object. How a card actually behaves during gameplay is defined by this object.
*** <code class="key list">components</code>: A list of card entity components which determines the actual behaviors of the card.
**** <code class="key object"></code>Each element of the list is a card entity component object. See [[card entity component]] for details.
** <code class="key string">prefabName</code>: The [[Glossary#Prefab|prefab]] name of the card.
** <code class="key string">baseId</code>: Type of the card. See [[#Card types]] for possible values.
** <code class="key string">color</code>: Class of the card. See [[#Classes]] for possible values.
** <code class="key string">set</code>: Set of the card. See [[#Sets]] for possible values.
** <code class="key number">rarity</code>: Rarity of the card. See [[#Rarities]] for possible values.
** <code class="key string">setAndRarityKey</code>: Translation key of the card's set and rarity. See [[#Set-and-rarity keys]] for possible values.
** <code class="key number">craftingBuy</code>: Sparks spent for crafting a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card costs, which is server-side. This field doesn't exist for Superpowers and Tokens.
** <code class="key number">craftingSell</code>: Sparks returned for recycling a copy of this card. This is just a client-side value; it doesn't affect the actual number of Sparks the card returns, which is server-side. This field doesn't exist for Superpowers, Tokens and Basic Common cards.
** <code class="key number">displayHealth</code>: The {{icon|h}} value displayed on the cardface. Use the [[Component/Health|Health]] component to set the Fighter's actual {{icon|h}}. For Tricks and Environments, this should be set to <code class="num">0</code>.
** <code class="key number">displayAttack</code>: The {{icon|a}} value displayed on the cardface. Use the [[Component/Attack|Attack]] component to set the Fighter's actual {{icon|a}}. For Tricks and Environments, this should be set to <code class="num">0</code>.
** <code class="key number">displaySunCost</code>: The {{icon|s}} or {{icon|b}} cost value displayed on the cardface. Use the [[Component/SunCost|SunCost]] component to set the card's actual cost. This field is still named <code class="key">display''Sun''Cost</code> when the card belongs to Zombie faction and costs Brains.
** <code class="key string">faction</code>: Faction where the card belongs. See [[#Factions]] for possible values.
** <code class="key bool">ignoreDeckLimit</code>: Purpose unknown.
** <code class="key bool">isPower</code>: Whether this card is a Superpower. Use the [[Component/Superpower|Superpower]] component to make the card actual Superpower.
** <code class="key bool">isPrimaryPower</code>: Whether this card is a Signature Superpower. Use the [[Component/PrimarySuperpower|PrimarySuperpower]] component to make the card actual Signature Superpower.
** <code class="key bool">isFighter</code>: Whether this card is a Fighter.
** <code class="key bool">isEnv</code>: Whether this card is an Environment.
** <code class="key bool">isAquatic</code>: Whether this card is {{keyword|Amphibious}}. Use the [[Component/Aquatic|Aquatic]] component to make the card actually Amphibious.
** <code class="key bool">isTeamup</code>: Whether this card has {{keyword|Team-Up}}. Use the [[Component/Teamup|Teamup]] component to make the card actually have Team-Up.
** <code class="key list">subtypes</code>: A list of the card's subtypes (often referred to as "tribes" in player community). Use the [[Component/Subtypes|Subtypes]] component to set the card's actual subtypes.
*** <code class="key string"></code>Each element of the list is a string that indicates a subtype. See [[Component/Subtypes#Possible subtypes]] for possible values.
** <code class="key list">tags</code>: A list of the card's tags. Some card interactions may rely on tags. Use the [[Component/Tags|Tags]] component to set the card's actual tags.
*** <code class="key string"></code>Each element of the list is a string that indicates a tag. Tag strings can be arbitrary.
** <code class="key list">subtype_affinities</code>: A list of subtypes that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key string"></code>Each element of the list is a string that indicates a subtype.
** <code class="key list">subtype_affinity_weight</code>: Affinity weights of the subtypes in the <code class="key">subtype_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective subtype of <code class="key">subtype_affinities</code>.
** <code class="key list">tag_affinities</code>: A list of tags that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key string"></code>Each element of the list is a string that indicates a tag.
** <code class="key list">tag_affinity_weight</code>: Affinity weights of the tags in the <code class="key">tag_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective tag of <code class="key">tag_affinities</code>.
** <code class="key list">card_affinities</code>: A list of cards that the card has affinity with. This is used to determine the deck quality when you use the "Finish for Me" feature.
*** <code class="key number"></code>Each element of the list is an integer that indicates the GUID of a card.
** <code class="key list">card_affinity_weight</code>: Affinity weights of the cards in the <code class="key">card_affinities</code> list.
*** <code class="key number"></code>Each element of the list is a number that indicates the affinity weight of the respective card of <code class="key">card_affinities</code>.
** <code class="key bool">usable</code>: Whether this card is usable during gameplay. Use the [[Component/Unusable|Unusable]] component to make the card actually unusable.
** <code class="key list">special_abilities</code>: A list of the card's special abilities. It affects the {{icon|a}}/{{icon|h}} icons ''on the cardface''. For Tricks and Environments, this list should be empty. To set the actual abilities of a card, use proper components in the card entity.
*** <code class="key string"></code>Each element of the list is a string that indicates a special ability. See [[#Special abilities]] for possible values.
|2={
"entity": {
"components": [
/* list of card entity components */
]
},
"prefabName": /* a string */,
"baseId": /* a string */,
"color": /* a string */,
"set": /* a string */,
"rarity": /* an integer */,
"setAndRarity": /* a string */,
"craftingBuy": /* an integer */,
"craftingSell": /* an integer */,
"displayHealth": /* an integer */,
"displayAttack": /* an integer */,
"displaySunCost": /* an integer */,
"faction": /* a string */,
"ignoreDeckLimit": /* true or false */,
"isPower": /* true or false */,
"isPrimaryPower": /* true or false */,
"isFighter": /* true or false */,
"isEnv": /* true or false */,
"isAquatic": /* true or false */,
"isTeamup": /* true or false */,
"subtypes": [
/* list of strings */
],
"tags": [
/* list of strings */
],
"subtype_affinities": [
/* list of strings */
],
"subtype_affinity_weights": [
/* list of numbers */
],
"tag_affinities": [
/* list of strings */
],
"tag_affinity_weights": [
/* list of numbers */
],
"card_affinities": [
/* list of GUIDs */
],
"card_affinity_weights": [
/* list of numbers */
],
"usable": /* true or false */,
"special_abilities": [
/* list of strings */
]
}
}}
== {{msg|section title|examples}} ==
Let's take the first card in cards.json - [[pvzwiki:Guacodile (PvZH)|Guacodile]] - for example:
<syntaxhighlight lang="json">
{
"entity": {
"components": [
/* tl;dr */
]
},
"prefabName": "2f9fa005-8b50-4d1a-89be-38e4a82036c4",
"baseId": "Base",
"color": "Guardian",
"set": "Gold",
"rarity": 2,
"setAndRarityKey": "Bloom_SuperRare",
"craftingBuy": 1000,
"craftingSell": 250,
"displayHealth": 3,
"displayAttack": 4,
"displaySunCost": 4,
"faction": "Plants",
"ignoreDeckLimit": false,
"isPower": false,
"isPrimaryPower": false,
"isFighter": true,
"isEnv": false,
"isAquatic": true,
"isTeamup": false,
"subtypes": [
"Fruit",
"Animal"
],
"tags": [
"destroy",
"anyplantfighter",
"anyaquaticplantfighter",
"notpineclone",
"aquatic",
"cost6orless",
"randomplantcard"
],
"subtype_affinities": [],
"subtype_affinity_weights": [],
"tag_affinities": [],
"tag_affinity_weights": [],
"card_affinities": [
8,
462
],
"card_affinity_weights": [
1.2,
1.2
],
"usable": true,
"special_abilities": [
"Unique"
]
}
</syntaxhighlight>
This means: the prefab name of the card is <code class="str">2f9fa005-8b50-4d1a-89be-38e4a82036c4</code>; it is a Plant of Guardian Class; its set and rarity is Premium - Super-Rare; crafting a copy of this card costs 1000 Sparks; recycling a copy of this card returns 250 Sparks; it is a 4{{icon|s}}-cost 4{{icon|a}}/3{{icon|h}} non-Superpower Fighter; it is {{keyword|Amphibious}}; it doesn't have {{keyword|Team-Up}}; it is of Fruit and Animal subtypes; it is usable during gameplay; it has a Unique ability (its "When destroyed" ability) and thus has a {{icon|star}} below the middle of its {{icon|a}}/{{icon|h}} icons.
== Details ==
=== Card types ===
The <code class="key">baseId</code> field of a card definition object identifies the outward type of the card.
{| class="wikitable"
! Value of <code class="key">baseId</code> !! Card type
|-
| <code class="str">"Base"</code> || Plant
|-
| <code class="str">"BaseZombie"</code> || Zombie
|-
| <code class="str">"BasePlantOneTimeEffect"</code> || Plant Trick
|-
| <code class="str">"BaseZombieOneTimeEffect"</code> || Zombie Trick
|-
| <code class="str">"BasePlantEnvironment"</code> || Plant Environment
|-
| <code class="str">"BaseZombieEnvironment"</code> || Zombie Environment
|}
The <code class="key">isFighter</code> and <code class="key">isEnv</code> fields also indicates the card type.
{| class="wikitable"
! Value of <code class="key">isFighter</code> !! Value of <code class="key">isEnv</code> !! Card type
|-
| <code class="keyword">true</code> || <code class="keyword">false</code> || Plant or Zombie
|-
| <code class="keyword">false</code> || <code class="keyword">false</code> || Trick
|-
| <code class="keyword">false</code> || <code class="keyword">true</code> || Environment
|}
To make a card actual Fighter, Trick or Environment, use neither or either of [[Component/Burst|Burst]] and [[Component/Environment|Environment]] components in the card entity.
=== Classes ===
The <code class="key">baseId</code> field of a card definition object identifies the Class(es) of the card. It decides the background color of the cardface.
{| class="wikitable"
! Value of <code class="key">color</code> !! Class
|-
| <code class="str">"Guardian"</code> || Guardian
|-
| <code class="str">"Kabloom"</code> || Kabloom
|-
| <code class="str">"MegaGro"</code> || Mega-Grow
|-
| <code class="str">"Smarty"</code> || Smarty
|-
| <code class="str">"Solar"</code> || Solar
|-
| <code class="str">"Hungry"</code> || Beastly
|-
| <code class="str">"Brainy"</code> || Brainy
|-
| <code class="str">"Madcap"</code> || Crazy
|-
| <code class="str">"Hearty"</code> || Hearty
|-
| <code class="str">"Sneaky"</code> || Sneaky
|-
| <code class="str">"0"</code> || (No Class)
|}
If a card has two Classes, separate the Class names with a comma. (e.g. <code class="str">"Guardian, Kabloom"</code>, whitespace is optional)
Classes play no role during gameplay. Thus there are no Class components for card entities. They make a difference only when you're building a deck.
=== Sets ===
The <code class="key">set</code> field of a card definition object identifies the set of the card.
{| class="wikitable"
! Value of <code class="key">set</code> !! Set
|-
| <code class="str">"Hero"</code> || Signature Superpower
|-
| <code class="str">"Superpower"</code> || Non-signature Superpower
|-
| <code class="str">"Token"</code> || Token
|-
| <code class="str">"Silver"</code> || Basic
|-
| <code class="str">"Gold"</code> || Premium
|-
| <code class="str">"Set2"</code> || Galactic Garden
|-
| <code class="str">"Set3"</code> || Colossal Fossil
|-
| <code class="str">"Set4"</code> || Triassic Triumph
|-
| <code class="str">"Event"</code> || Event
|-
| <code class="str">""</code> || Removed Superpower
|-
| <code class="str">"Blank"</code> || Blank
|-
| <code class="str">"Cheats"</code> || Cheats
|-
| <code class="str">"Board"</code> || Board Ability
|}
=== Rarities ===
The <code class="key">rarity</code> field of a card definition object identifies the outward rarity of the card. This affects the banner shown at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">rarity</code> !! Rarity
|-
| <code class="num">0</code> || Uncommon
|-
| <code class="num">1</code> || Rare
|-
| <code class="num">2</code> || Super-Rare
|-
| <code class="num">3</code> || Legendary
|-
| <code class="num">4</code> || Common or Token
|-
| <code class="num">5</code> || Event
|}
Use the [[Component/Rarity|Rarity]] component to set the actual rarity used in gameplay.
=== Set-and-rarity keys ===
The <code class="key">setAndRarityKey</code> field of a card definition object identifies the translation key of the card's set and rarity. The localization is shown on the banner at the bottom of the card info box.
{| class="wikitable"
! Value of <code class="key">setAndRarityKey</code> !! Localization !! Note
|-
| <code class="str">"Superpower_SuperRare"</code> || Super-Rare || For Non-signature Superpowers
|-
| <code class="str">"Dawn_Common"</code> || Basic - Common ||
|-
| <code class="str">"Bloom_Common"</code> || Premium - Uncommon ||
|-
| <code class="str">"Bloom_Rare"</code> || Premium - Rare ||
|-
| <code class="str">"Bloom_SuperRare"</code> || Premium - Super-Rare ||
|-
| <code class="str">"Bloom_Legendary"</code> || Premium - Legendary ||
|-
| <code class="str">"Galactic_Common"</code> || Galactic - Uncommon ||
|-
| <code class="str">"Galactic_Rare"</code> || Galactic - Rare ||
|-
| <code class="str">"Galactic_SuperRare"</code> || Galactic - Super-Rare ||
|-
| <code class="str">"Galactic_Legendary"</code> || Galactic - Legendary ||
|-
| <code class="str">"Colossal_Common"</code> || Colossal - Uncommon ||
|-
| <code class="str">"Colossal_Rare"</code> || Colossal - Rare ||
|-
| <code class="str">"Colossal_SuperRare"</code> || Colossal - Super-Rare ||
|-
| <code class="str">"Colossal_Legendary"</code> || Colossal - Legendary ||
|-
| <code class="str">"Triassic_Common"</code> || Triassic - Uncommon || rowspan=4 | English localizations for these four keys are absent due to unknown reasons.
|-
| <code class="str">"Triassic_Rare"</code> || Triassic - Rare
|-
| <code class="str">"Triassic_SuperRare"</code> || Triassic - Super-Rare
|-
| <code class="str">"Triassic_Legendary"</code> || Triassic - Legendary
|-
| <code class="str">"Token"</code> || Token ||
|-
| <code class="str">"Premium_Event"</code> || Event ||
|-
| <code class="str">""</code> or <code class="keyword">null</code> || || No translation key
|}
=== Factions ===
The <code class="key">faction</code> field of a card definition object identifies the outward faction of the card. Use respective component in the card entity to set the actual faction.
{| class="wikitable"
! Value of <code class="key">faction</code> !! Faction !! Required component
|-
| <code class="str">"Plants"</code> || Plant || [[Component/Plants|Plants]]
|-
| <code class="str">"Zombies"</code> || Zombie || [[Component/Zombies|Zombies]]
|-
| <code class="str">"All"</code> || Board || [[Component/BoardAbility|BoardAbility]]
|}
=== Special abilities ===
The <code class="key">special_abilties</code> list of a card definition object determines the ability icons shown ''on the cardface''.
{| class="wikitable"
! String value !! Ability
|-
| <code class="str">"Ambush"</code> || {{keyword|Anti-Hero}}
|-
| <code class="str">"Armor"</code> || {{keyword|Armored}}
|-
| <code class="str">"AttackOverride"</code> || {{keyword|AttackOverride}}
|-
| <code class="str">"Truestrike"</code> || {{keyword|Bullseye}}
|-
| <code class="str">"Deadly"</code> || {{keyword|Deadly}}
|-
| <code class="str">"Repeater"</code> || {{keyword|Double Strike}}
|-
| <code class="str">"Frenzy"</code> || {{keyword|Frenzy}}
|-
| <code class="str">"Overshoot"</code> || {{keyword|Overshoot}}
|-
| <code class="str">"Strikethrough"</code> || {{keyword|Strikethrough}}
|-
| <code class="str">"Unique"</code> || {{icon|star}}Unique
|-
| <code class="str">"Untrickable"</code> || {{keyword|Untrickable}}
|}
If an ability...
* doesn't match any of the abilities listed in the table above (except Unique)
* is not {{keyword|Aquatic}}, {{keyword|Team-Up}} nor {{keyword|Gravestone}}
* is not a "When played", "When revealed" or "While in your hand" ability
Then it matches Unique. The icon for Unique is a {{icon|star}} below the middle of the {{icon|a}}/{{icon|h}} icons.
To affect the {{icon|a}}/{{icon|h}} icons used when the Fighter is ''in play'', use the [[Component/ShowTriggeredIcon|ShowTriggeredIcon]] component in the card entity.
[[Category:Game asset]]
cd7e33061f839f307bf28b205ee3e983a1f3303c